how to say or in c sharp code example
Example 1: how to say or in c#
//To say or in c#:
if (a>0 || b<5)
{
//Or in C# is 2 bars, "||"
}
Example 2: what is the and in c#
//The AND Symbol is &
Example 3: c# negation
bool passed = false;
Console.WriteLine(!passed); // output: True
Console.WriteLine(!true); // output: False