B
Brad Williams
I'm needing to reflect on classes to find any fields they may declare of a
certain type. However, the MemberInfo objects returned by Type.FindMembers
do not expose the field's type, to my amazement.
Now the MemberInfo object returned in this case is actually of the more
derived class RuntimeFieldInfo, which *does* have a FieldType property which
is exactly what I want (I see it in the debugger). But RuntimeFieldInfo is
"internal" so I can't use it in my code!
Is there a way to get the type of a field of a class through reflection? I
could (ahem) parse MemberInfo.ToString(), but ...
Thanks,
Brad Williams
certain type. However, the MemberInfo objects returned by Type.FindMembers
do not expose the field's type, to my amazement.
Now the MemberInfo object returned in this case is actually of the more
derived class RuntimeFieldInfo, which *does* have a FieldType property which
is exactly what I want (I see it in the debugger). But RuntimeFieldInfo is
"internal" so I can't use it in my code!
Is there a way to get the type of a field of a class through reflection? I
could (ahem) parse MemberInfo.ToString(), but ...
Thanks,
Brad Williams