BitConverter: ToInt64

ToInt64

Returns a 64-bit signed integer converted from eight bytes at a specified position in a byte array.



 Public Function ToInt64(
	  ByRef Value ( ) As Byte,
	  ByVal StartIndex As Long ) As Int64

Parameters

Value
[ByRef] Byte. An array of bytes.
StartIndex
[ByVal] Long. The starting position within Value.

Return Values

Int64 -  A 64-bit signed integer formed by eight bytes beginning at StartIndex.

Remarks

The ToInt64 method converts the bytes from index StartIndex to StartIndex + 7 to a Int64 value. The order of bytes in the array must be little-endian.

Exceptions

ExceptionCondition
ArgumentExceptionStartIndex is greater than or equal to the length of Value minus 7, and is less than or equal to the length of Value minus 1.
ArgumentNullExceptionValue is uninitialized.
ArgumentOutOfRangeExceptionStartIndex is less than zero or greater than the length of Value minus 1.

See Also

Project CorLib Overview

Class BitConverter Overview