Skip to content

Instantly share code, notes, and snippets.

@MelbourneDeveloper
Created February 13, 2021 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MelbourneDeveloper/1e62f0bb584c81dff01ed62a188c9251 to your computer and use it in GitHub Desktop.
Save MelbourneDeveloper/1e62f0bb584c81dff01ed62a188c9251 to your computer and use it in GitHub Desktop.
Nullable Reference Types Minimal Console App Sample
#nullable enable
using Sample;
using System;
var testRecord = new TestRecord("Hi", null);
Console.WriteLine(testRecord.NotNullableProperty);
namespace Sample
{
public record TestRecord(string NotNullableProperty, string? NullableProperty);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment