ISerializationSurrogate.GetObjectData Method
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.
Populates the provided SerializationInfo with the data needed to serialize the object.
public:
void GetObjectData(System::Object ^ obj, System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
public void GetObjectData (object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Security.SecurityCritical]
public void GetObjectData (object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
abstract member GetObjectData : obj * System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
[<System.Security.SecurityCritical>]
abstract member GetObjectData : obj * System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
Public Sub GetObjectData (obj As Object, info As SerializationInfo, context As StreamingContext)
- obj
- Object
The object to serialize.
- info
- SerializationInfo
The SerializationInfo to populate with data.
- context
- StreamingContext
The destination (see StreamingContext) for this serialization.
- Attributes
The caller does not have the required permission.
Extracts data from object obj
and stores it in the SerializationInfo info
parameter.
Having located the surrogate, this method stores information on the object obj
in the SerializationInfo info
parameter. This information describes its view of that object, including the object's fields, properties, and current values. The SerializationInfo might correspond to the actual object, or it can be a synthesized view of the surrogate.
Product | Versions |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: