using Alias = Class; with generics

alias, c#, generics

Solution

Is this possible with classes that depend on generics, i have tried a similar approach but it does not seem to compile.

using IE<T> = System.Collections.Generic.IEnumerable<T>;

No, this isn’t possible. The only thing that works is this:

 using IE = System.Collections.Generic.IEnumerable<string>;

A `using` declaration cannot be generic.

Problem

In C# it is possible to alias classes using the following: ``` using Str = System.String; ``` Is this possible with classes that depend on generics, i have tried a similar approach but it does not seem to compile. ``` using IE<T> = System.Collections.Generic.IEnumerable<T>; ``` and ``` using IE = System.Collections.Generic.IEnumerable; ``` Is this even possible using generics in C#? If so, what is it that I am missing?

Original source

Related problems