Using Statement with Generics: using ISet = System.Collections.Generic.ISet

Unfortunately, the using directive does not do what you want. You can say:

using Frob = System.String;

and

using ListOfInts = System.Collections.Generic.List<System.Int32>;

but you cannot say

using Blob<T> = System.Collections.Generic.List<T>

or

using Blob = System.Collections.Generic.List

It’s a shortcoming of the language that has never been rectified.

Leave a Comment