Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

StreamingContext Struct

Definition

Namespace:
System.Runtime.Serialization
Assemblies:
mscorlib.dll, System.Runtime.Serialization.Primitives.dll
Assemblies:
netstandard.dll, System.Runtime.dll
Assembly:
System.Runtime.Serialization.Primitives.dll
Assembly:
System.Runtime.dll
Assembly:
mscorlib.dll
Assembly:
netstandard.dll
Source:
StreamingContext.cs
Source:
StreamingContext.cs
Source:
StreamingContext.cs
Source:
StreamingContext.cs
Source:
StreamingContext.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Describes the source and destination of a given serialized stream, and provides an additional caller-defined context.

public value class StreamingContext
public struct StreamingContext
public readonly struct StreamingContext
[System.Serializable]
public struct StreamingContext
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public struct StreamingContext
type StreamingContext = struct
[<System.Serializable>]
type StreamingContext = struct
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type StreamingContext = struct
Public Structure StreamingContext
Inheritance
StreamingContext
Attributes

Remarks

Indicates the source or destination of the bits that the formatter uses. Classes with surrogates or that implement ISerializable can serialize or ignore fields and values based on the information stored in the streaming context. For example, a window handle is still valid if the State property is set to System.Runtime.Serialization.StreamingContextStates.CrossProcess.

Constructors

Name Description
StreamingContext(StreamingContextStates, Object)
Obsolete.

Initializes a new instance of the StreamingContext class with a given context state, and some additional information.

StreamingContext(StreamingContextStates)
Obsolete.

Initializes a new instance of the StreamingContext class with a given context state.

Properties

Name Description
Context

Gets context specified as part of the additional context.

State
Obsolete.

Gets the source or destination of the transmitted data.

Methods

Name Description
Equals(Object)

Determines whether two StreamingContext instances contain the same values.

GetHashCode()

Returns a hash code of this object.

Applies to

See also


Feedback

Was this page helpful?