safe navigation operator

noun

A binary operator that returns its second argument, unless the first argument is null, in which case it returns null; used to simplify code that would otherwise need multiple explicit checks for nullity.

Meanings

nounsafe navigation operator (plural safe navigation operators)

plural safe navigation operators

  1. computingA binary operator that returns its second argument, unless the first argument is null, in which case it returns null; used to simplify code that would otherwise need multiple explicit checks for nullity.

    C# 6 introduced a cascading nulls operator, also called the null-conditional operator and the safe navigation operator.

    2017, Gary McLean Hall, Adaptive Code: Agile coding with design patterns and SOLID principles
    2 more examples

    One operator I haven't talked about yet is the safe navigation operator (?.). By preceding a dot with a question mark, you can safely navigate to methods or properties of an object even if that object is null.

    2009, Bashar Jawad, Groovy and Grails Recipes, page 57

    The safe navigation operator (?.) provides navigation on the nested properties without getting any exception when a null value is evaluated from any of the properties iterated.

    2015, Mert Caliskan, Kenan Sevindik, Beginning Spring, page 278
Cite this entry
APA

safe navigation operator. (n.d.). In WatkinsX Dictionary. Retrieved November 4, 2026, from https://dictionary.watkinsx.com/word/safe%20navigation%20operator

MLA

“safe navigation operator.” WatkinsX Dictionary, https://dictionary.watkinsx.com/word/safe%20navigation%20operator. Accessed November 4, 2026.

Chicago

WatkinsX Dictionary, s.v. “safe navigation operator,” accessed November 4, 2026, https://dictionary.watkinsx.com/word/safe%20navigation%20operator.

Source: safe navigation operator on Wiktionary, CC BY-SA 4.0.