Using Bool : bool « Data Types « C# / C Sharp






Using Bool

Using Bool
   
/*
 * C# Programmers Pocket Consultant
 * Author: Gregory S. MacBeth
 * Email: gmacbeth@comporium.net
 * Create Date: June 27, 2003
 * Last Modified Date:
 * Version: 1
 */
using System;

namespace Client.Chapter_1___Common_Type_System
{
  public class UsingBoolChapter_1___Common_Type_System {
    static void Main(string[] args)
    {
      bool MyBool = false;

      if (MyBool)
      {
        Console.WriteLine(MyBool);
      }
      else
      {
        Console.WriteLine(MyBool);
      }
    }
  }

}

           
         
    
    
  








Related examples in the same category

1.bool variable
2.A static method that returns a Boolean value.
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