Skip to content

Glossary: C# Basics

?. and ?? (null-conditional and null-coalescing operators)

Also written: ?., ??, null-conditional operator, null-coalescing operator

`?.` reads a property only if the reference isn't null and gives null otherwise. `??` supplies a fallback value when the left side is null, as in `tea?.Price ?? 0m`.

Where the book teaches it

Related terms

nullnullable type (?)Reference