C# 8.0 is published now so you can make reference types nullable too. For this you have to add
#nullable enable
Feature over your namespace. It is detailed here
For example something like this will work:
#nullable enable
namespace TestCSharpEight
{
public class Developer
{
public string FullName { get; set; }
public string UserName { get; set; }
public Developer(string fullName)
{
FullName = fullName;
UserName = null;
}
}}
Also you can have a look this nice article from John Skeet that explains details.