Skip to content

Glossary: C# Beyond the Basics

null-forgiving operator

Also written: !

A `!` after a value tells the compiler "this isn't null, trust me" and hides the warning. It checks nothing at run time, so a wrong guess still crashes.

Where the book teaches it

Related terms

nullable reference typesnull-state analysis