| Visual Basic (Declaration) | |
|---|---|
Public Overloads Function Save( _ ByVal fileName As String, _ ByVal overwrite As Boolean _ ) As String | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As AttachmentStream Dim fileName As String Dim overwrite As Boolean Dim value As String value = instance.Save(fileName, overwrite) | |
Parameters
- fileName
- The name of the file to save the attachment to.
- overwrite
- Specifies if the destination file should be overwritten.
This method saves the attachment to the file specified by fileName. If overwrite is true, any file with the same name and path is overwritten.
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