Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal : support a number type constraint on generic type parameters #11175

Closed
nikolalukovic opened this issue May 9, 2016 · 1 comment
Closed

Comments

@nikolalukovic
Copy link

Allow the constraints on a type parameter to include number or to specify each number type with a comma delimiter.

void Test<T>() where T : number

or

void Test<T>() where T : int,decimal,float,double,long etc...

@alrz
Copy link
Member

alrz commented May 9, 2016

Dup of #3391, #3255

Related: #2147, #8986

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants