bool myBool = true;
myBool = false;
if(mybool == false) {
}
using System;
namespace DataType
{
class BooleanExample
{
public static void Main(string[] args)
{
bool isValid = true;
Console.WriteLine(isValid);
}
}
}
int val = 1;bool isAdult = Convert.ToBoolean(val);Console.WriteLine("Bool: " + isAdult.ToString());Console.WriteLine("Int: " + Convert.ToInt32(isAdult).ToString());