[Proposal]: Local generic type #8523
Unanswered
Kation
asked this question in
Language Ideas
Replies: 2 comments 1 reply
-
See: #7916 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
C# should have a way to quickly use generic class and methods even though there is no generic argument but a type variable.
Design
C# should expose a syntax that allow developer to convert a type variable to a generic argument.
Such as
alias T = type;
.Also we can use generic constraints as
alias T where T : IA = type;
.Then complier can generate codes:
Also, we can have type check
Generate code:
Beta Was this translation helpful? Give feedback.
All reactions