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