I'm using the following method to enumerate fields of my classes-
EnumerateFields(typeof(Student));
void EnumerateFields(Type type)
{
PropertyInfo[] props = type.GetProperties();
foreach (PropertyInfo prp in props)
{
}
}
It works nicely.
Now I would like to do the same task from a List<>. Pseudo code-
EnumerateFields(List<Student>);
void EnumerateFields(List<T>)
{
}
Is there any way to do it?