Click or drag to resize
MimeKit

MimeUtilsTryParse(Byte, Int32, Int32, Version) Method

Try to parse a version from a header such as Mime-Version.

Namespace: MimeKit.Utils
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
C#
public static bool TryParse(
	byte[] buffer,
	int startIndex,
	int length,
	out Version version
)

Parameters

buffer  Byte
The raw byte buffer to parse.
startIndex  Int32
The index into the buffer to start parsing.
length  Int32
The length of the buffer to parse.
version  Version
The parsed version.

Return Value

Boolean
true, if the version was successfully parsed, false otherwise.
Exceptions
ExceptionCondition
ArgumentNullExceptionbuffer is null.
ArgumentOutOfRangeExceptionstartIndex and length do not specify a valid range in the byte array.
Remarks
Parses a MIME version string from the supplied buffer starting at the given index and spanning across the specified number of bytes.
See Also