-
Notifications
You must be signed in to change notification settings - Fork 1k
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] Allow defining local aliases for types #3306
Comments
Seems a popular demand :) |
Too many votes for those proposals, yet none is a champion! |
Development of C# isn't a democracy - votes on issues merely show what's popular, not what's good. The LDM decides on what goes into the next version of the language - and they take into account a far wider range of inputs than just this repo. Someone pointed out (I think it was @CyrusNajmabadi, but I'm not 100% sure) that the feedback in this repo is less than the statistical noise in feedback through other channels. Fortunately, the LDM takes a special interest in what's said here because many of the contributors take the time to carefully think through issues instead of just banging on their own drum. |
I came across this code:
And I wondered: Can't I simplify this to:
This seems readable.
But unfortunately it is not possible, since T exists only inside the class scope, and
using
exists only in file/namespace scope!So, I wish if C# allows
using
type aliases inside classes. This is a must in today's projects that contain very complex generics and lambdas that make our heads spin.The text was updated successfully, but these errors were encountered: