samedi 12 octobre 2019

RtFieldInfo.FieldType.DeclaredFields is available in the IDE/Debugger/Watch Window but not in my code?

I'm using reflection to get a private field of an object and I'm trying to find out the data type of the field, using

var privateField = objType.GetProperties(private).OfType<MemberInfo>.Union(objType.GetFields(private))

It returns an object of type RtFieldInfo, when I debug to this point I can inspect the FieldType.DeclaredFields and find that it's a value field of int32 with a hasValue boolean field as it's a nullable type, but in my code the IDE is not giving me FieldType as an option on the object.

Am I missing a using or why would this behaviour be happening?





Aucun commentaire:

Enregistrer un commentaire