NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

BinaryFormatter Constructor (ISurrogateSelector, StreamingContext)

Initializes a new BinaryFormatter.

[Visual Basic]
Overloads Public Sub New( _
   ByVal selector As ISurrogateSelector, _
   ByVal context As StreamingContext _
)
[C#]
public BinaryFormatter(
   ISurrogateSelector selector,
   StreamingContext context
);
[C++]
public: BinaryFormatter(
   ISurrogateSelector* selector,
   StreamingContext context
);
[JScript]
public function BinaryFormatter(
   selector : ISurrogateSelector,
   context : StreamingContext
);

Parameters

selector
ISurrogateSelector to be used. Can be null
context
Streaming context for this serialization/ deserialization

Remarks

Initializes a new BinaryFormatter. Objects will be serialized to, or deserialized from, the specified Stream. The process will use the specified SurrogateSelector (used to search for any surrogates you wish to register; these are 'helpers' used to serialize and deserialize objects of specific classes); if you don't want or need surrogates, specify this argument as null. For the choice of StreamingContext you can supply, see the StreamingContext class. If you specify null, then it defaults to CrossMachine.

See Also

BinaryFormatter Class | BinaryFormatter Members | System.Runtime.Serialization.Formatters.Binary Namespace | BinaryFormatter Constructor Overload List