Why can one aliased C# Type not be accessed by another?

后端 未结 3 1215
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-11 22:28

good stuff

// ok to alias a List Type
using AliasStringList = System.Collections.Generic.List;

// and ok to alias a List of Lists like this
us         


        
3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-11 23:07

    The documentation says:

    The right side of a using alias directive must always be a fully-qualified type regardless of the using directives that come before it.

    So basically alias directives ignore other using directives.

提交回复
热议问题