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

StreamingContext

Synopsis

This class describes the source or destination of a serialized stream. The context can determine how classes are serialized and require special parsing during deserialization. The State property holds a value from StreamingContextStates that indicates the destination of object data during serialization and the source of data during deserialization. This could indicate that you are serializing data to a file, for example, or deserializing data that came from another process.

public struct StreamingContext {
// Public Constructors
   public method StreamingContext(
        StreamingContextStates state);  
   public method StreamingContext(
        StreamingContextStates state, object additional);  
// Public Instance Properties
   public field object Context{get; } 
   public field StreamingContextStates State{get; } 
// Public Instance Methods
   public override method bool Equals(object obj);              // overrides ValueType
   public override method int GetHashCode();                     // overrides ValueType
}

Hierarchy

System.ObjectSystem.ValueTypeStreamingContext

Returned By

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

Passed To

Multiple types

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