Generic using alias directives #4259
Answered
by
HaloFour
naine
asked this question in
Language Ideas
-
Currently it is possible to create file-scoped type aliases in C#. using Foo = System.Collections.ArrayList; For generic types, it is currently only possible to create aliases to constructed types. using Foo = System.Collections.Generic.List<int>; I propose to allow the alias itself to be generic, using syntax like the following: using Foo<T> = System.Collections.Generic.List<T>;
using Bar<T> = System.Collections.Generic.Dictionary<string, T>;
using Bar<T1, T2> = System.Collections.Generic.Dictionary<T1, T2>; |
Beta Was this translation helpful? Give feedback.
Answered by
HaloFour
Dec 23, 2020
Replies: 1 comment
-
See: #1239 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
YairHalberstadt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See: #1239