A sixteen-part deep dive into C# nullable reference types — from the new default to advanced nullability attributes and generics.
C# Nullable References
C# 8.0 nullable references: non-nullable is the new default
Explore C# 8.0's nullable references feature, as Ian discusses its impact on default nullability assumptions in this informative post.
C# 8.0 nullable references: embrace the expressiveness
C# 8.0 nullable references detect null-related errors and enhance code expressiveness.
C# 8.0 nullable references: getting started in an existing codebase
C# 8.0's nullable references feature dramatically changes a fundamental aspect of the language. In this post, Ian explains how to you can soften the impact by enabling gradually across your projects.
C# 8.0 nullable references: inferred (non-)nullness
Ian discusses inferred nullness and its significance in C# 8.0's new Nullable References feature.
C# 8.0 nullable references: transcending the type system with AllowNull
Explore C# 8.0 nullable references & AllowNull attribute for better null-related bug detection and enhanced expressiveness in properties & generics.
C# 8.0 nullable references: get better results with nullability attributes
C# 8.0 nullable references enable us to annotate our code with information that lets the compiler discover possible null-related bugs.
C# 8.0 nullable references: conditional post-conditions
Explore C#8's NotNullWhen, MaybeNullWhen, & NotNullIfNotNull attributes for improved nullability warnings, aiding method output inference from inputs.
C# 8.0 nullable references: MaybeNull
The MaybeNull attribute enables C#8's nullable references feature to provide more useful warnings, by helping it infer information about a method output.
C# 8.0 nullable references: more type system transcendence with DisallowNull
C# 8.0 nullable references help identify potential null-related bugs. DisallowNull attribute enhances properties and generics.
C# 8.0 nullable references: supporting older runtimes
See how to use C# 8.0 nullable references even when targetting older versions of .NET that don't officially support it.
C# 8.0 nullable references: when methods don't return
Explore the importance of DoesNotReturn & DoesNotReturnIf attributes in C# 8 nullable references, enhancing their long-standing role in C#.
C# 8.0 nullable references and serialization
C# 8's nullable references feature can clash with common serialization techniques. This article shows how to deal with that.
C# 8.0 nullable references: defeating the point with empty strings
Enabling C# 8's nullable references feature often produces a lot of warnings. Avoid the temptation to make some go away by initializing properties to empty strings.
C# 8.0 nullable references: NotNull
The NotNull attribute enables C#8's nullable references feature to provide more useful warnings, by helping it infer information about a method argument.
C# 8.0 nullable references: prepare today by not misusing 'as'
Prepare for using C# 8.0 nullable references by not misusing the 'as' operator.
C# 10.0 improves handling of nullable references in generic types - no more AllowNull
Explore C# 10.0's improved nullability annotations in generic code, replacing AllowNull with more intuitive syntax.