Logical Operators

Operators that combine or reverse boolean conditions.

What is Logical Operators in C#?

Logical Operators — Operators that combine or reverse boolean conditions.

class Venue
{
    bool CanEnter(int age)
    {
        bool isAdult = age >= 18;
        bool isSenior = age >= 65;
        return isAdult && !isSenior;
    }
}

Level: Novice · More C# terms at this level

Updated

In other subjects