| Visual Basic (Declaration) | |
|---|---|
Public Overloads Sub Save() | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As AttachmentStream instance.Save() | |
| C# | |
|---|---|
public void Save() | |
| Managed Extensions for C++ | |
|---|---|
public: void Save(); | |
| C++/CLI | |
|---|---|
public: void Save(); | |
This method saves the attachment to the default directory, using the FileName property. Does not overwrite.
If the current attachment is represented by a MemoryStream (for example, if Pop.UseMemoryStreams is true) do not use this method. Use one of the Save overloads which allow specification of the filename to save the attachment to.
If overwrite is false, it will try for up to 16 times to create a file with a number on the end. If it can't make any of those without overwriting, it creates a unique name based on the date and time appended on to the end of the filename but before the extension (in the format file(date time).txt).
This method reads data until 0 bytes are returned, indicating the end of the stream.
Target Platforms: Microsoft .NET Framework 2.0