This documentation is archived and is not being maintained.

TypedReference.MakeTypedReference Method

Makes a TypedReference for a field identified by a specified object and list of field descriptions.

This method is not CLS-compliant. For more information about CLS compliance, see What is the Common Language Specification.

[Visual Basic]
<CLSCompliant(False)>
Public Shared Function MakeTypedReference( _
   ByVal target As Object, _
   ByVal flds() As FieldInfo _
) As TypedReference
[C#]
[CLSCompliant(false)]
public static TypedReference MakeTypedReference(
 object target,
 FieldInfo[] flds
);
[C++]
[CLSCompliant(false)]
public: static TypedReference MakeTypedReference(
 Object* target,
 FieldInfo* flds[]
);
[JScript]
public
   CLSCompliant(false)
static function MakeTypedReference(
 target : Object,
 flds : FieldInfo[]
) : TypedReference;

Parameters

target
An object that contains the field described by the first element of flds.
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.

Return Value

A TypedReference for the field described by the last element of flds.

Exceptions

Exception Type Condition
ArgumentNullException target or flds is a null reference (Nothing in Visual Basic).

-or-

An element of flds is a null reference (Nothing).

ArgumentException The flds array has no elements.

-or-

An element of flds is not a RuntimeFieldInfo.

-or-

The IsInitOnly or IsStatic property of an element of flds is true.

MissingMemberException 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.

-or-

The field described by an element of flds is not a value type.

Remarks

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.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

TypedReference Structure | TypedReference Members | System Namespace

Show: