| Visual Basic (Declaration) | |
|---|---|
Public Overrides Sub Flush() | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As MessageStream instance.Flush() | |
| C# | |
|---|---|
public override void Flush() | |
| Managed Extensions for C++ | |
|---|---|
public: void Flush(); override | |
| C++/CLI | |
|---|---|
public: void Flush(); override | |
| Exception | Description |
|---|---|
| System.IO.IOException | An I/O error occurs. |
| System.ObjectDisposedException | The Stream is closed. |
If the Stream contains any internal Streams as members, this method will also cause the Flush method of all internal Streams.
This method MUST be called when writing is complete for operations to operate properly. One example is when creating a message comprised of only headers. If Flush is not called, the headers will be lost.
Target Platforms: Microsoft .NET Framework 2.0