How to iterate the List in Reflection
You just need to cast it: var collection = (List<Student>) studentPro.GetValue(studentObj,null); The value returned to you and stored in var is of type object. So you need to cast it to List<Student> first, before trying looping through it. RANT That is why I personally do not like var, it hides the type – unless in … Read more