1 out of 1 rated this helpful - Rate this topic

ISerializationSurrogate.SetObjectData Method

Populates the object using the information in the SerializationInfo.

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

Object SetObjectData (
	Object obj,
	SerializationInfo info,
	StreamingContext context,
	ISurrogateSelector selector
)
Object SetObjectData (
	Object obj, 
	SerializationInfo info, 
	StreamingContext context, 
	ISurrogateSelector selector
)
function SetObjectData (
	obj : Object, 
	info : SerializationInfo, 
	context : StreamingContext, 
	selector : ISurrogateSelector
) : Object

Parameters

obj

The object to populate.

info

The information to populate the object.

context

The source from which the object is deserialized.

selector

The surrogate selector where the search for a compatible surrogate begins.

Return Value

The populated deserialized object.
Exception type Condition

SecurityException

The caller does not have the required permission.

The SetObjectData method is called during deserialization. With this method, you can take the empty Objectobj that has already been created, and enter SerializationInfoinfo data into that object. Constructors are not invoked during deserialization of information and reconstruction of the object.

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
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ