Skip to content

Instantly share code, notes, and snippets.

@christiannagel
Last active June 15, 2018 05: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/e105b8a6f7cf02da430c9e912e7419c4 to your computer and use it in GitHub Desktop.
Assigning nullable to non-nullable with C# 8
static string GetIsbn1(Book book)
{
string? isbn = book.Isbn;
if (isbn == null)
{
return string.Empty;
}
return isbn;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment