3.2.The Boolean Type

Boolean types used for true or false values that must be assign the values when variable was declared, move back to C or C++ by using value 0 to check the false values and value 1 to check the true values that we use instead of Boolean type.

Displaying Boolean Values: Boolean.cs
using System;

class Booleans
{
   publicstaticvoid Main()
    {
        bool content = true;
        bool noContent = false;

        Console.WriteLine("It is {0} that C# Station provides C# programming language content.", content);
        Console.WriteLine("The statement above is not {0}.", noContent);
    }
}

Yes No Suggest edit
Suggest Edit