Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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