public class Class1
{
}
public class Class2
{
private List<Class1> _class1
public List<Class1> PropertyClass1
{
get{ return this._class1; }
set{ this._class1 = value; }
}
}
ok, now, using reflection i have a PropertyInfo. This contains the property 'PropertyClass1'. How i can instantiate a new list of this type
Sample:
List<pInfo.PropertyType.GetGenericArguments[0]> newlist = new List<pInfo.PropertyType.GetGenericArguments[0]>(); //don¡¯t work!
How this correct way to do this
Thanks!