# Null-Conditional Operator

say it: **“NUL kun-DISH-un-ul OP-uh-ray-ter”** **/nʌl kənˈdɪʃənəl ˈɑpəˌreɪtɚ/**

The ?. operator, which accesses a member only when the value is not null.

## What does **Null-Conditional Operator** do in C#?

**Null-Conditional Operator** — The ?. operator, which accesses a member only when the value is not null.

```csharp
class Profile
{
    int? NameLength(string? name)
    {
        return name?.Length;
    }
}
```

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

Updated: November 17, 2026

Source: https://www.ask-codey.com/glossary/null-conditional-operator
