Windows apps
Collapse the table of content
Expand the table of content
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
public static object GetObjectValue(
 object obj
public: static Object* GetObjectValue(
 Object* obj
public static function GetObjectValue(
   obj : Object
) : Object;


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.


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


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

© 2017 Microsoft