Click or drag to resize
MimeKit

MimeContent Constructor

Initialize a new instance of the MimeContent class.

Namespace: MimeKit
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
public MimeContent(
	Stream stream,
	ContentEncoding encoding = ContentEncoding.Default
)

Parameters

stream  Stream
The content stream.
encoding  ContentEncoding  (Optional)
The stream encoding.
Exceptions
ExceptionCondition
ArgumentNullExceptionstream is null.
ArgumentException

stream does not support reading.

-or-

stream does not support seeking.

Remarks
When creating new MimeParts, the encoding should typically be Default unless the stream has already been encoded.
See Also