Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

FormatterServices.GetObjectData Method

Extracts the data from the specified object and returns it as an array of objects.

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

Parameters

obj
The object to write to the formatter.
members
The members to extract from the object.

Return Value

An array of Object containing data stored in members and associated with obj.

Exceptions

Exception Type Condition
ArgumentNullException The obj or members parameter is a null reference (Nothing in Visual Basic).

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

SerializationException An element of members does not represent a field.

Remarks

For each supplied member of the members array the GetObjectData method extracts the value associated with the obj object, and returns it. The length of the returned array is the same as the length of the members array.

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

FormatterServices Class | FormatterServices Members | System.Runtime.Serialization Namespace

Show:
© 2015 Microsoft