MapiAttachment.OpenRead

MapiAttachment.OpenRead method

Opens the attachment content for reading.

public Stream OpenRead()

Return Value

An independent, read-only, seekable stream over the attachment content.

Exceptions

exceptioncondition
InvalidOperationExceptionIf the attachment has no binary content.

Remarks

For attachments added from a stream the content is read from the source on demand and is not copied into memory. Each call returns an independent reader, so several readers may be used at the same time.

See Also