ComponentSerializationService.DeserializeTo Method (SerializationStore, IContainer, Boolean, Boolean)

Deserializes the given SerializationStore to the given container, optionally applying default property values.

Namespace:  System.ComponentModel.Design.Serialization
Assembly:  System (in System.dll)

public abstract void DeserializeTo(
	SerializationStore store,
	IContainer container,
	bool validateRecycledTypes,
	bool applyDefaults


Type: System.ComponentModel.Design.Serialization.SerializationStore

The SerializationStore to deserialize.

Type: System.ComponentModel.IContainer

The container to which IComponent objects will be added.

Type: System.Boolean

true to guarantee that the deserialization will only work if applied to an object of the same type.

Type: System.Boolean

true to indicate that the default property values should be applied.


store or container is null.


store does not contain data in a format the serialization container can process.

The DeserializeTo method deserializes store, but instead of producing new objects, it applies the data in the store to an existing set of objects that are taken from the provided container. As a result, the caller can create in advance an object however it sees fit. If an object has a deserialization state and the object is not named in the set of existing objects, a new object will be created. If that object also implements IComponent, it will be added to container. Objects in the container must have names and types that match objects in the serialization store in order for an existing object to be used.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft