ISerializationSurrogate.GetObjectData Method

Populates the provided SerializationInfo with the data needed to serialize the object.

Namespace: System.Runtime.Serialization
Assembly: mscorlib (in mscorlib.dll)

'Declaration
Sub GetObjectData ( _
	obj As Object, _
	info As SerializationInfo, _
	context As StreamingContext _
)
'Usage
Dim instance As ISerializationSurrogate
Dim obj As Object
Dim info As SerializationInfo
Dim context As StreamingContext

instance.GetObjectData(obj, info, context)
void GetObjectData (
	Object obj, 
	SerializationInfo info, 
	StreamingContext context
)
function GetObjectData (
	obj : Object, 
	info : SerializationInfo, 
	context : StreamingContext
)

Parameters

obj

The object to serialize.

info

The SerializationInfo to populate with data.

context

The destination (see StreamingContext) for this serialization.

Exception typeCondition

SecurityException

The caller does not have the required permission.

Extracts data from object obj and stores it in the SerializationInfoinfo parameter.

Having located the surrogate, this method stores information on the object obj in the SerializationInfoinfo 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.

This method is protected by a SecurityAction.LinkDemand for the SecurityPermission with the SecurityPermissionFlag.SerializationFormatter specified.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show: