ISerializationSurrogate.GetObjectData Method

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

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

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

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 Server 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 Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: