DataContractSerializer.DataContractSurrogate Property

Definition

Gets a surrogate type that can extend the serialization or deserialization process.

public System.Runtime.Serialization.IDataContractSurrogate DataContractSurrogate { get; }

Property Value

An implementation of the IDataContractSurrogate class.

Remarks

The IDataContractSurrogate can be used to customize how instances of a type are serialized and deserialized. For example, it can be used to enable the serialization of legacy types that are not serializable, that is, types to which the DataContractAttribute attribute has not been applied.

Applies to

Product Versions
.NET Framework 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

See also