Therefore, sometimes I want to include only one class from the namespace, and not into the full namespace, for example, here I create an alias for this class using the using statement:
using System; using System.Text; using Array = System.Collections.ArrayList;
I often do this with generics, so I don't need to repeat the arguments:
using LookupDictionary = System.Collections.Generic.Dictionary<string, int>;
Now I want to do the same with the generic type, saving it as a generic type:
using List<T> = System.Collections.Generic.List<T>;
But this does not compile, so is there a way to achieve the creation of this alias, leaving this type as common?
csharptest.net Feb 08 '11 at 18:38 2011-02-08 18:38
source share