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 );
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.
BinaryFormatter Class | BinaryFormatter Members | System.Runtime.Serialization.Formatters.Binary Namespace | BinaryFormatter Constructor Overload List