I am trying to cast IList type to List type but I am getting error every time.
IList
List
List subProducts= Model.subproduct
List subProducts= (List)Model.subproduct;
The implicit conversion failes because List<> implements IList, not viceversa. So you can say IList foo = new List(), but not List foo = (some IList-returning method or property).
List<>
IList foo = new List()
List foo = (some IList-returning method or property)