| Visual Basic (Declaration) | |
|---|---|
Public ReadOnly Property FileName As String | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As MessagePartStream Dim value As String value = instance.FileName | |
| C# | |
|---|---|
public string FileName {get;} | |
| Managed Extensions for C++ | |
|---|---|
public: __property string* get_FileName(); | |
Property Value
A string representing the file name used for this attachment or part.When possible, this property is set by information available about the file. When creating attachments, this information is obtained by information passed into the constructor. For example, if the attachment was created from a FileStream, this property is derived from the FileStream.Name property. If you wish to change the filename, simply set this property to a different value.
When getting attachments, this information is obtained from information available in the message. For example, if the attachment is a MIME part, this property will reflect the filename listed in the "Content-Disposition:" header.
If the Stream is a MessagePartStream, then this property is read-only.
Target Platforms: Microsoft .NET Framework 2.0
Copy Code