BitConverter.GetBytes Method (Double)

 

Returns the specified double-precision floating point value as an array of bytes.

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

static member GetBytes : 
        value:float -> byte[]

Parameters

value
Type: System.Double

The number to convert.

Return Value

Type: System.Byte[]

An array of bytes with length 8.

The order of bytes in the array returned by the GetBytes method depends on whether the computer architecture is little-endian or big-endian.

The following code example converts the bit patterns of Double values to Byte arrays with the GetBytes method.

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

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: