Skip to content

Instantly share code, notes, and snippets.

@christiannagel
Created June 10, 2018 08:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save christiannagel/a03ace71d07a2e7df5f326984d09c008 to your computer and use it in GitHub Desktop.
Nullability with C# 8
int i1 = 4; // null is not allowed
int? i2 = null; // null is allowed
string s1 = "a string"; // null is not allowed
string? s2 = null; // a nullable string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment