Click or drag to resize

UInt24GetValue Method

Returns a 24-bit unsigned integer from three bytes at a specified position in a byte array.

Namespace: GSF
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.256-beta+0e7e94d39a9b10efe7e26e3b8d5130afc0dd4d74
Syntax
public static UInt24 GetValue(
	byte[] value,
	int startIndex
)
View Source

Parameters

value  Byte
An array of bytes.
startIndex  Int32
The starting position within value.

Return Value

UInt24
A 24-bit unsigned integer formed by three bytes beginning at startIndex.
Exceptions
ExceptionCondition
ArgumentNullExceptionvalue cannot be null.
ArgumentOutOfRangeExceptionstartIndex is greater than value length.
ArgumentExceptionvalue length from startIndex is too small to represent an UInt24.
Remarks

You can use this function in-lieu of a System.BitConverter.ToUInt24 function.

Bytes endian order assumed to match that of currently executing process architecture (little-endian on Intel platforms).

See Also