bool variable : bool « Data Types « C# / C Sharp

bool variable


using System;

class Operators {
    static void Main() {
        bool a = 4 > 5;
        Console.WriteLine("{0}", a);


Related examples in the same category

1.A static method that returns a Boolean value.
2.Using BoolUsing Bool
3.Demonstrate bool valuesDemonstrate bool values
4.Print a truth table for the logical operatorsPrint a truth table for the logical operators
5.bool FalseString, TrueString
6.Convert boolean value to "Yes" or "No"
7.Converts string to Boolean, throws an exception if not compatible
8.Convert string to Boolean. A return value indicates whether the conversion succeeded or failed.
9.Convert text values to boolean