Assembly: mscorlib (in mscorlib.dll)
[CLSCompliantAttribute(false)] public static TypedReference MakeTypedReference ( Object target, FieldInfo flds )
/** @attribute CLSCompliantAttribute(false) */ public static TypedReference MakeTypedReference ( Object target, FieldInfo flds )
CLSCompliantAttribute(false) public static function MakeTypedReference ( target : Object, flds : FieldInfo ) : TypedReference
An object that contains the field described by the first element of flds.
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.
Return ValueA TypedReference for the field described by the last element of flds.
target or flds is a null reference (Nothing in Visual Basic).
An element of flds is a null reference (Nothing in Visual Basic).
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 MakeTypedReference 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 , this method can be used to access non-public members if the caller has been granted ReflectionPermission with the ReflectionPermissionFlag.ReflectionEmit 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 . For more information, see The .NET Framework 3.5 Architecture.
- ReflectionPermission for accessing non-public members when the grant set of the non-public members is restricted to the caller's grant set, or a subset thereof. Associated enumeration: System.Security.Permissions.ReflectionPermissionFlag.RestrictedMemberAccess
- ReflectionPermission for accessing non-public members regardless of their grant set. Associated enumeration: ReflectionPermissionFlag.MemberAccess
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.