# Logical Operators

*noun*

say it: **“LOJ-ih-kul OP-er-ay-terz”** **/ˈlɒdʒɪkəl ˈɒpəreɪtərz/**

Operators that combine or flip true-or-false conditions: && (and), || (or) and ! (not).

## What is **Logical Operators** in C#?

**Logical Operators** — Operators that combine or reverse boolean conditions.

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

## In a sentence

- “With the **logical operator** &&, the discount needs both a coupon and a total over $50.”

Level: Novice · [More C# terms at this level](https://www.ask-codey.com/glossary?category=c-sharp&level=1)

Updated: November 9, 2026

## In other subjects

- [Logical Operators in Java](https://www.ask-codey.com/glossary/logical-operators-java)
- [Logical Operators in JavaScript](https://www.ask-codey.com/glossary/logical-operators-javascript)
- [Logical Operators in MongoDB](https://www.ask-codey.com/glossary/logical-operators-mongodb)
- [Logical Operators in PowerShell](https://www.ask-codey.com/glossary/logical-operators-powershell)
- [Logical Operators in Python](https://www.ask-codey.com/glossary/logical-operators)

Source: https://www.ask-codey.com/glossary/logical-operators-c-sharp
