good stuff
// ok to alias a List Type
using AliasStringList = System.Collections.Generic.List<string>;
// and ok to alias a List of Lists like this
using AliasListOfStringList1 = System.Collections.Generic.List<System.Collections.Generic.List<string>>;
bad stuff
// However **error** to alias another alias
using AliasListOfStringList2 = System.Collections.Generic.List<AliasStringList>;
Produces the compile error
The type or namespace name
‘AliasStringList’ could not be found
(are you missing a using directive or
an assembly reference?)
Note: this is the using directive not the using statement.
You just can’t use an alias declared in a using inside another using. For a set of usings like you have, you can assume that sibling using declarations don’t exist.
From MSDN
It provides simplified example of your exact problem, this is expected behavior: