operator_logical_and.htm

using System;
//csc operator_logical_and.cs
//the result is true only both of the operands are true.
namespace ex_logicaland
{
public class logic_and
{
public void and_operator()
{
Console.Write("Condition true & false :\t ");
Console.WriteLine(true & false); // logical and
Console.Write("Condition true & true :\t\t "); // logical and
Console.WriteLine(true & true);
Console.Write("Condition 0x{0:x} :\t\t"); // bitwise and
Console.WriteLine("0x{0:x}", 0xf8 & 0x3f);
}
}

class Test
{
public static void Main()
{
logic_and la = new logic_and();
la.and_operator();
}
}

}//end of the name space