C# Convert ToUInt64(Boolean)
Description
Convert ToUInt64(Boolean)
converts the specified Boolean
value to the equivalent 64-bit unsigned integer.
Syntax
Convert.ToUInt64(Boolean)
has the following syntax.
[CLSCompliantAttribute(false)]
public static ulong ToUInt64(
bool value
)
Parameters
Convert.ToUInt64(Boolean)
has the following parameters.
value
- The Boolean value to convert.
Returns
Convert.ToUInt64(Boolean)
method returns The number 1 if value is true; otherwise, 0.
Example
//from w w w . j a v a2 s . c o m
using System;
public class MainClass{
public static void Main(String[] argv){
Console.WriteLine(Convert.ToUInt64(true));
}
}
The code above generates the following result.