How do I convert a non-Generic IList to IList?

前端 未结 7 1843
失恋的感觉
失恋的感觉 2021-02-02 06:20

I have class that wants an IList, but I have a Systems.Collection.IList, coming from an NHibernate quere.

I want to create a method th

7条回答
  •  遇见更好的自我
    2021-02-02 06:33

    Frederik is correct, NHibernate already does this.

    var data = query.List();
    

    This would result in an IList of the type you specified. In this case IList.

提交回复
热议问题