Click or drag to resize
MimeKit

BestEncodingFilterGetBestEncoding Method

Get the best encoding given the specified constraints.

Namespace: MimeKit.IO.Filters
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
C#
public ContentEncoding GetBestEncoding(
	EncodingConstraint constraint,
	int maxLineLength = 78
)

Parameters

constraint  EncodingConstraint
The encoding constraint.
maxLineLength  Int32  (Optional)
The maximum allowable line length (not counting the CRLF). Must be between 60 and 998 (inclusive).

Return Value

ContentEncoding
The best encoding.
Exceptions
ExceptionCondition
ArgumentOutOfRangeException

maxLineLength is not between 60 and 998 (inclusive).

-or-

constraint is not a valid value.

Remarks
Gets the best encoding given the specified constraints.
See Also