C# BitConverter Int64BitsToDouble
Description
BitConverter Int64BitsToDouble
converts the specified
64-bit signed integer to a double-precision floating point number.
Syntax
BitConverter.Int64BitsToDouble
has the following syntax.
public static double Int64BitsToDouble(
long value
)
Parameters
BitConverter.Int64BitsToDouble
has the following parameters.
value
- The number to convert.
Returns
BitConverter.Int64BitsToDouble
method returns A double-precision floating point number whose value is equivalent to value.
Example
The following code example converts the bit patterns of several Int64 values to Double values with the Int64BitsToDouble method.
//from w w w . j a v a 2 s . co m
using System;
class Int64BitsToDoubleDemo
{
public static void Main( )
{
double doubleValue;
doubleValue = BitConverter.Int64BitsToDouble( 0x3FF0000000000000 );
Console.WriteLine( doubleValue );
}
}
The code above generates the following result.