Click or drag to resize
MimeKit

TextPartGetText(Encoding) Method

Get the decoded text content using the provided charset encoding to override the charset specified in the Content-Type parameters.

Namespace: MimeKit
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
C#
public string GetText(
	Encoding encoding
)

Parameters

encoding  Encoding
The charset encoding to use.

Return Value

String
The decoded text.

Implements

ITextPartGetText(Encoding)
Exceptions
ExceptionCondition
ArgumentNullExceptionencoding is null.
ObjectDisposedException The TextPart has been disposed.
Remarks
Uses the provided charset encoding to convert the raw text content into a unicode string, overriding any charset specified in the Content-Type header.
See Also