| Visual Basic (Declaration) | |
|---|---|
Public Shadows Sub Flush() | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As AttachmentStream instance.Flush() | |
| C# | |
|---|---|
public new void Flush() | |
| Managed Extensions for C++ | |
|---|---|
public: new void Flush(); | |
| C++/CLI | |
|---|---|
public: new void Flush(); | |
| 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