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