FormatterServices.GetObjectData(Object, MemberInfo[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
An array of Object that contains data stored in members and associated with obj.
- Attributes
Exceptions
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.