Can a type alias refer to another type alias?

c#

Solution

No. These aliases only apply within the namespace body.

Source

You can work around this limitation by moving the 2nd `using` inside the namespace body like this:

using Word = System.String;

namespace MyNamespace {
   using Words = System.Collections.Generic.List<Word>;
   ...
}

Problem

When doing this in C#: ``` using Word = System.String; using Words = System.Collections.Generic.List<Word>; ``` The compiler complains that "the type or namespace 'Word' could not be found". Is this not possible? If it makes a difference, I'm trying to do this in the global namespace. EDIT: just found another SO that answers this: Why can one aliased C# Type not be accessed by another? This can marked as duplicate.

Original source

Related problems