Hi,
I am trying to use reflection to collect a property from a class that returns a certain type. However some of the properties I'm returning are strongly typed lists that house the type I want. Essentially I am trying to do the following:
Public Function GetPropertyInfo(ByVal t as System.Type)
for each pi as System.Reflection.PropertyInfo in ob.GetType.GetProperties()
if pi.PropertyType.equals(GetType(List(Of t)))
return pi
end if
next
Return Nothing
End Function
Obviously this doesn't work as it throws an error saying t is not a declared type. Is there any way to do this?
Thanks.