P
parez
Hi
One of the property of returnedObject is of the type List<MyClass> (in
just one instance)
in some other case it could be List<MyClass2>
I want to check if a particular propert is a generic list.
If it is, then do something with the type of the the class (MyClass
and MyClass2)
PropertyInfo[] propertyInfo =
returnedObject.GetType().GetProperties();
foreach (PropertyInfo pi in propertyInfo)
{
// one of the "pi"s is of the list List<MyClass>
if (pi.PropertyType == typeof(List<>))
{
//Do Speical stuff
how do i go about this..
One of the property of returnedObject is of the type List<MyClass> (in
just one instance)
in some other case it could be List<MyClass2>
I want to check if a particular propert is a generic list.
If it is, then do something with the type of the the class (MyClass
and MyClass2)
PropertyInfo[] propertyInfo =
returnedObject.GetType().GetProperties();
foreach (PropertyInfo pi in propertyInfo)
{
// one of the "pi"s is of the list List<MyClass>
if (pi.PropertyType == typeof(List<>))
{
//Do Speical stuff
how do i go about this..