Export (0) Print
Expand All

BitConverter.ToUInt64 Method

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

This API is not CLS-compliant. 

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

[<CLSCompliantAttribute(false)>]
static member ToUInt64 : 
        value:byte[] * 
        startIndex:int -> uint64

Parameters

value
Type: System.Byte[]

An array of bytes.

startIndex
Type: System.Int32

The starting position within value.

Return Value

Type: System.UInt64
A 64-bit unsigned integer formed by the eight bytes beginning at startIndex.

ExceptionCondition
ArgumentException

startIndex 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.

ArgumentNullException

value is a null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

startIndex is less than zero or greater than the length of value minus 1.

The ToUInt64 method converts the bytes from index startIndex to startIndex + 7 to a UInt64 value. The order of bytes in the array must reflect the endianness of the computer system's architecture; for more information, see the Remarks section of the BitConverter class topic.

The following code example converts elements of Byte arrays to UInt64 values with the ToUInt64 method.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

.NET for Windows Store apps

Supported in: Windows 8

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft