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