& and && in C#


Grammarly

More than 40 Lakhs Students and Professionals use Grammarly for their spell and grammar checks. You can register and try for free.

Below is a sample soucrecode demonstrating the usage of & and && operator in c#.

using System;

namespace AbundantCode

{

internal class Program

{

//& and && in C#

private static void Main(string[] args)

{

bool Input1 = true, input2 = false;

Console.WriteLine("Result of & Operator is {0}", Input1 & input2);

Console.WriteLine("Result of && Operator is {0}", Input1 && input2);

Console.ReadKey();

}

}

}

Grammarly

More than 40 Lakhs Students and Professionals use Grammarly for their spell and grammar checks. You can register and try for free.
%d bloggers like this: