...

/

Exercise: Fixing Compilation Errors with Nullable References

Exercise: Fixing Compilation Errors with Nullable References

Learn to enable and remove remove all nullable warnings.

Nullable references and arrays

With nullable references, we have type hints to tell when an object reference is not null or when it might be null. We can declare variables as either Movie movie or Movie? movie to make them non-nullable and nullable references, respectively.

There’s a known pitfall when turning on nullable references and using arrays. Sometimes, even though we’ve ...