| Visual Basic (Declaration) | |
|---|---|
Public Overloads Shadows Sub Dispose() | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As AttachmentStream instance.Dispose() | |
| C# | |
|---|---|
public new void Dispose() | |
| Managed Extensions for C++ | |
|---|---|
public: new void Dispose(); | |
| C++/CLI | |
|---|---|
public: new void Dispose(); | |
The AttachmentStream.Dispose method is intended for closing files (and deleting temporary files created when this object is created during a MessageStream.Write operation), so that they can be used elsewhere. It is critical that the user either call Content.Close() or AttachmentStream.Dispose() before trying to open a file contained in an AttachmentStream.
Target Platforms: Microsoft .NET Framework 2.0