Freigeben über


MimeWriter.GetContentWriteStream Method

The GetContentWriteStream method returns a stream to which you can write the content of the current part using the current value of Content-Transfer-Encoding header.

Namespace:  Microsoft.Exchange.Data.Mime
Assembly:  Microsoft.Exchange.Data.Common (in Microsoft.Exchange.Data.Common.dll)

Syntax

'Declaration
Public Function GetContentWriteStream As Stream
'Usage
Dim instance As MimeWriter
Dim returnValue As Stream

returnValue = instance.GetContentWriteStream()
public Stream GetContentWriteStream()

Return Value

Type: System.IO.Stream

Exceptions

Exception Condition
InvalidOperationException

The GetContentWriteStream method throws this exception if GetContentWriteStream is called twice, if the Content-Transfer-Encoding header has not been written, or if it has been written with a value representing an unrecognized encoding.

Remarks

You must write the Content-Transfer-Encoding header with a supported value before calling the GetContentWriteStream method.