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;
- The object to write to the formatter.
- The members to extract from the object.
An array of Object containing data stored in members and associated with obj.
|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.|
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.
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:
- SecurityPermission for providing serialization services. Associated enumeration: SecurityPermissionFlag.SerializationFormatter, SecurityAction.LinkDemand.