Click or drag to resize
MimeKit

Rfc2047EncodePhrase(FormatOptions, Encoding, String, Int32, Int32) Method

Encode a phrase.

Namespace: MimeKit.Utils
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
public static byte[] EncodePhrase(
	FormatOptions options,
	Encoding charset,
	string phrase,
	int startIndex,
	int count
)

Parameters

options  FormatOptions
The formatting options
charset  Encoding
The charset encoding.
phrase  String
The phrase to encode.
startIndex  Int32
The starting index of the phrase to encode.
count  Int32
The number of characters to encode.

Return Value

Byte
The encoded phrase.
Exceptions
ExceptionCondition
ArgumentNullException

options is null.

-or-

charset is null.

-or-

phrase is null.

ArgumentOutOfRangeExceptionstartIndex and count do not specify a valid range in the byte array.
Remarks
Encodes the phrase according to the rules of rfc2047 using the specified charset encoding and formatting options.
See Also