98-372 · Question #88
Which structure is used to describe the source and destination of a specified serialized stream, as well as to provide an extra caller-defined context?
The correct answer is B. StreamingContext. The StreamingContext structure is used to describe the source and destination of a specified serialized stream, as well as to provide an extra caller-defined context. It specifies the source/destination of the bits that the formatter uses. Any class with substitute or that implem
Question
Which structure is used to describe the source and destination of a specified serialized stream, as well as to provide an extra caller-defined context?
Options
- AStreaming
- BStreamingContext
- CStreamingContextStates
- DStreamingStates
How the community answered
(40 responses)- A15% (6)
- B75% (30)
- C3% (1)
- D8% (3)
Explanation
The StreamingContext structure is used to describe the source and destination of a specified serialized stream, as well as to provide an extra caller-defined context. It specifies the source/destination of the bits that the formatter uses. Any class with substitute 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 applicable if the State property is set to System.Runtime.Serialization.StreamingContextStates.CrossProcess. Answer: A and D are incorrect. There is no such structure as Streaming and StreamingStates in the .NET Framework. Answer: C is incorrect. StreamingContextStates is an enumeration. It is used to define a set of flags indicating the source/destination context for the stream during serialization.
Topics
Community Discussion
No community discussion yet for this question.