Makes a TypedReference for a field identified by a specified object and list of field descriptions.
This API is not CLS-compliant. Namespace: System
Assembly: mscorlib (in mscorlib.dll)
[CLSCompliantAttribute(false)] public: static TypedReference MakeTypedReference( Object^ target, array<FieldInfo^>^ flds )
- Type: System::Object
An object that contains the field described by the first element of flds.
- Type: array<System.Reflection::FieldInfo>
A list of field descriptions where each element describes a field that contains the field described by the succeeding element. Each described field must be a value type. The field descriptions must be RuntimeFieldInfo objects supplied by the type system.
target or flds is nullptr.
An element of flds is nullptr.
The flds array has no elements.
An element of flds is not a RuntimeFieldInfo.
Parameter target does not contain the field described by the first element of flds, or an element of flds describes a field that is not contained in the field described by the succeeding element of flds.
The field described by an element of flds is not a value type.
The method returns a typed reference to some terminal field, where the target parameter contains the field described by the first element of flds, the field described by the first element of flds contains the field described by the second element of flds, and so on until the terminal field is reached.
For an explanation of run-time type system objects such as RuntimeFieldInfo, see Runtime Types in Reflection.
Starting with the .NET Framework 2.0 Service Pack 1, this method can be used to access non-public members if the caller has been granted ReflectionPermission with the ReflectionPermissionFlag::RestrictedMemberAccess flag and if the grant set of the non-public members is restricted to the caller’s grant set, or a subset thereof. (See Security Considerations for Reflection.)
To use this functionality, your application should target the .NET Framework 3.5 or later.
Requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.