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

前端 未结 6 1714
时光取名叫无心
时光取名叫无心 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:29

    In some cases you can go with inheritance:

    public class MyList : List>, IComparable>> { }
    
    public void Meth()
    {
        var x = new MyList();
    }
    

提交回复
热议问题