Επεξεργασία

Κοινή χρήση μέσω


FormatterServices.GetObjectData(Object, MemberInfo[]) Method

Definition

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

public:
 static cli::array <System::Object ^> ^ GetObjectData(System::Object ^ obj, cli::array <System::Reflection::MemberInfo ^> ^ members);
public static object?[] GetObjectData (object obj, System.Reflection.MemberInfo[] members);
public static object[] GetObjectData (object obj, System.Reflection.MemberInfo[] members);
[System.Security.SecurityCritical]
public static object[] GetObjectData (object obj, System.Reflection.MemberInfo[] members);
static member GetObjectData : obj * System.Reflection.MemberInfo[] -> obj[]
[<System.Security.SecurityCritical>]
static member GetObjectData : obj * System.Reflection.MemberInfo[] -> obj[]
Public Shared Function GetObjectData (obj As Object, members As MemberInfo()) As Object()

Parameters

obj
Object

The object to write to the formatter.

members
MemberInfo[]

The members to extract from the object.

Returns

Object[]

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

Attributes

Exceptions

The obj or members parameter is null.

An element of members is null.

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.

Applies to