Click or drag to resize
MimeKit

TextPartSetText Method (Encoding, String)

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

Namespace:  MimeKit
Assembly:  MimeKit (in MimeKit.dll) Version: 3.0.0
Syntax
C#
public void SetText(
	Encoding encoding,
	string text
)

Parameters

encoding
Type: System.TextEncoding
The charset encoding.
text
Type: SystemString
The text content.
Exceptions
ExceptionCondition
ArgumentNullException

encoding is null.

-or-

text is null.

ObjectDisposedException The TextPart has been disposed.
Remarks
This method is similar to setting the Text property, but allows specifying a charset encoding to use. Also updates the Charset property.
See Also