Using Statement with Generics: using ISet<> = System.Collections.Generic.ISet<>

前端 未结 6 1722
时光取名叫无心
时光取名叫无心 2020-11-29 09:00

Since I am using two different generic collection namespaces (System.Collections.Generic and Iesi.Collections.Generic), I have conflicts. In other

6条回答
  •  悲哀的现实
    2020-11-29 09:35

    Unfortunately, the using directive does not do what you want. You can say:

    using Frob = System.String;
    

    and

    using ListOfInts = System.Collections.Generic.List;
    

    but you cannot say

    using Blob = System.Collections.Generic.List
    

    or

    using Blob = System.Collections.Generic.List
    

    It's a shortcoming of the language that has never been rectified.

提交回复
热议问题