C# Convert ToUInt64(Double)
Description
Convert ToUInt64(Double)
converts the value of the specified
double-precision floating-point number to an equivalent 64-bit unsigned
integer.
Syntax
Convert.ToUInt64(Double)
has the following syntax.
[CLSCompliantAttribute(false)]
public static ulong ToUInt64(
double value
)
Parameters
Convert.ToUInt64(Double)
has the following parameters.
value
- The double-precision floating-point number to convert.
Returns
Convert.ToUInt64(Double)
method returns value, rounded to the nearest 64-bit unsigned integer. If value is halfway
between two whole numbers, the even number is returned; that is, 4.5 is converted
to 4, and 5.5 is converted to 6.
Example
/*w w w . j av a2 s . co m*/
using System;
public class MainClass{
public static void Main(String[] argv){
Console.WriteLine(Convert.ToUInt64(123.123D));
}
}
The code above generates the following result.