Skip to content

Null-forgiving operator C# 8.0correctness

Tell the compiler to accept a null where one would not be acceptable.

This release introduced Nullable reference types that allow developers to state that reference types should never be null.

The null-forgiving operator ! was also added in order that you can override this behavior such as in unit tests and thus avoid the Warning CS8602: Dereference of a possibly null reference compiler warning.

More information