Cast IList to List

后端 未结 9 1681
时光取名叫无心
时光取名叫无心 2020-12-08 06:09

I am trying to cast IList type to List type but I am getting error every time.

List subProducts= Model.subproduct         


        
9条回答
  •  感情败类
    2020-12-08 06:47

    In my case I had to do this, because none of the suggested solutions were available:

    List subProducts = Model.subproduct.Cast().ToList();
    

提交回复
热议问题