Class FileAttachment
- Namespace
- Microsoft.Exchange.WebServices.Data
- Assembly
- Microsoft.Exchange.WebServices.dll
Represents a file attachment.
public sealed class FileAttachment : Attachment
- Inheritance
-
FileAttachment
- Inherited Members
Properties
Content
Gets the content of the attachment into memory. Content is set only when Load() is called.
public byte[] Content { get; }
Property Value
- byte[]
FileName
Gets the name of the file the attachment is linked to.
public string FileName { get; }
Property Value
IsContactPhoto
Gets or sets a value indicating whether this attachment is a contact photo.
public bool IsContactPhoto { get; set; }
Property Value
Methods
Load(Stream)
Loads the content of the file attachment into the specified stream. Calling this method results in a call to EWS.
public void Load(Stream stream)
Parameters
stream
StreamThe stream to load the content of the attachment into.
Load(string)
Loads the content of the file attachment into the specified file. Calling this method results in a call to EWS.
public void Load(string fileName)
Parameters
fileName
stringThe name of the file to load the content of the attachment into. If the file already exists, it is overwritten.