MimeContent Constructor

Initialize a new instance of the MimeContent class.

Definition

Namespace: MimeKit
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public MimeContent(
	Stream stream,
	ContentEncoding encoding = ContentEncoding.Unspecified
)

Parameters

stream  Stream
The content stream.
encoding  ContentEncoding  (Optional)
The stream encoding.

Remarks

When creating new MimeParts, the encoding should typically be Unspecified unless the stream has already been encoded.

Exceptions

ArgumentNullException stream is .
ArgumentException

stream does not support reading.

-or-

stream does not support seeking.

See Also