FieldInfo::GetValueDirect Method (TypedReference)
Returns the value of a field supported by a given object.
This API is not CLS-compliant.
Assembly: mscorlib (in mscorlib.dll)
public: [CLSCompliantAttribute(false)] virtual Object^ GetValueDirect( TypedReference obj )
Parameters
- obj
-
Type:
System::TypedReference
A TypedReference structure that encapsulates a managed pointer to a location and a runtime representation of the type that might be stored at that location.
| Exception | Condition |
|---|---|
| NotSupportedException | The caller requires the Common Language Specification (CLS) alternative, but called this method instead. |
for accessing non-public fields when the grant set of the non-public members is restricted to the caller's grant set, or a subset thereof. Associated enumeration: ReflectionPermissionFlag::RestrictedMemberAccess
for accessing non-public fields regardless of their grant set. Associated enumeration: ReflectionPermissionFlag::MemberAccess
when invoked late-bound through mechanisms such as Type::InvokeMember. Associated enumeration: ReflectionPermissionFlag::MemberAccess.
Available since 1.1