This documentation is archived and is not being maintained.

Formatter.Context Property

When overridden in a derived class, gets or sets the StreamingContext used for the current serialization.

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 Context As StreamingContext  _
   Implements IFormatter.Context
[C#]
public abstract StreamingContext Context {get; set;}
[C++]
public: __property virtual StreamingContext get_Context() = 0;
public: __property virtual void set_Context(StreamingContext) = 0;
[JScript]
public abstract function get Context() : StreamingContext;
public abstract function set Context(StreamingContext);

Property Value

The StreamingContext used for the current serialization.

Implements

IFormatter.Context

Remarks

The StreamingContext is an indication of either the source of the bits being deserialized or the destination of the bits being serialized. It has no impact on default serialization, but is passed as an argument to ISerializable and ISerializationSurrogate.

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

Requirements

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

Show: