Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

RuntimeHelpers.GetObjectValue Method

Boxes a value type.

[Visual Basic]
Public Shared Function GetObjectValue( _
   ByVal obj As Object _
) As Object
[C#]
public static object GetObjectValue(
 object obj
);
[C++]
public: static Object* GetObjectValue(
 Object* obj
);
[JScript]
public static function GetObjectValue(
   obj : Object
) : Object;

Parameters

obj
The value type to be boxed.

Return Value

Returns a boxed copy of obj if it is a value class; otherwise obj itself is returned.

Remarks

Boxing a value type creates an object and performs a shallow copy of the fields of the specified value type into the new object.

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 Compact Framework

See Also

RuntimeHelpers Class | RuntimeHelpers Members | System.Runtime.CompilerServices Namespace

Show:
© 2017 Microsoft