Export (0) Print
Expand All

TypedReference.SetTypedReference Method

Converts the specified value to a TypedReference.

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 Sub SetTypedReference( _
   ByVal target As TypedReference, _
   ByVal value As Object _
)
[C#]
[CLSCompliant(false)]
public static void SetTypedReference(
 TypedReference target,
 object value
);
[C++]
[CLSCompliant(false)]
public: static void SetTypedReference(
 TypedReference target,
 Object* value
);
[JScript]
public
   CLSCompliant(false)
static function SetTypedReference(
 target : TypedReference,
 value : Object
);

Parameters

target
The target of the conversion.
value
The value to be converted.

Return Value

This method assigns value to target. A change type of value converts it to the type of the TypedReference. The Convert.ChangeType method does the conversion.

Exceptions

Exception Type Condition
ArgumentNullException value is a null reference (Nothing in Visual Basic).
InvalidCastException The requested conversion is not possible.

Requirements

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

See Also

TypedReference Structure | TypedReference Members | System Namespace

Show:
© 2015 Microsoft