This documentation is archived and is not being maintained.

Formatter.SurrogateSelector Property

When overridden in a derived class, gets or sets the ISurrogateSelector used with the current formatter.

The Formatter type is not CLS-compliant. For more information about CLS compliance, see What is the Common Language Specification.

[Visual Basic]
Public MustOverride Property SurrogateSelector As _
   ISurrogateSelector  Implements IFormatter.SurrogateSelector
public abstract ISurrogateSelector SurrogateSelector {get; set;}
public: __property virtual ISurrogateSelector* get_SurrogateSelector() = 0;
public: __property virtual void set_SurrogateSelector(ISurrogateSelector*) = 0;
public abstract function get SurrogateSelector() : ISurrogateSelector;
public abstract function set SurrogateSelector(ISurrogateSelector);

Property Value

The ISurrogateSelector used with the current formatter.




Use the SurrogateSelector to look up implementations of ISerializationSurrogate that control the serialization of a particular type.

Note   If an object type has a matching surrogate, then serialization and deserialization are handed off to the surrogate even if the type implements the ISerializable interface.

Notes to Inheritors:  You must implement this property in a derived class.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Formatter Class | Formatter Members | System.Runtime.Serialization Namespace