To use a bool literal in a conditional statement

Jitendrasoft09
Posted by Jitendrasoft09 under C# category on | Points: 40 | Views : 710
using System;

class JkExample {

static void Main(string[] args) {

bool var1 = true;
bool var2 = false;

Console.WriteLine("Value 1: {0}", var1);
Console.WriteLine("Value 2: {0}", var2);

if (true) {
Console.WriteLine("Hello");
}


Console.ReadLine();
}
}

Comments or Responses

Login to post response