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