Export (0) Print
Expand All

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.  

Namespace: System
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

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. The field descriptions must be RuntimeFieldInfo objects supplied by the type system.

Return Value

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

Exception typeCondition

ArgumentNullException

target or flds is a null reference (Nothing in Visual Basic).

-or-

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

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.

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.

Windows 98, Windows 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 Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft