TextPartSetText(String, String) Method

Set the text content and the charset parameter in the Content-Type header.

Definition

Namespace: MimeKit
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public void SetText(
	string charset,
	string text
)

Parameters

charset  String
The charset encoding.
text  String
The text content.

Implements

ITextPartSetText(String, String)

Remarks

This method is similar to setting the Text property, but allows specifying a charset encoding to use. Also updates the Charset property.

Exceptions

ArgumentNullException

charset is .

-or-

text is .

NotSupportedException The charset is not supported.
ObjectDisposedException The TextPart has been disposed.

See Also