O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

IFormatter

Synopsis

This interface defines the basic serialization and deserialization functionality for a formatter. Its three properties determine the SerializationBinder, StreamingContext, and SurrogateSelector of the formatter. It also defines the two basic methods of Serialize() and Deserialize().

public interface IFormatter {
// Public Instance Properties
   public field SerializationBinder Binder{set; get; } 
   public field StreamingContext Context{set; get; } 
   public field ISurrogateSelector SurrogateSelector{set; get; } 
// Public Instance Methods
   public method object Deserialize(
        System.IO.Stream serializationStream);  
   public method void Serialize(
        System.IO.Stream serializationStream, 
        object graph);  
}

Implemented By

Formatter, System.Runtime.Serialization.Formatters.Binary.BinaryFormatter, System.Runtime.Serialization.Formatters.Soap.SoapFormatter

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required