Skip to content

Instantly share code, notes, and snippets.

@atsvetkov
Last active June 10, 2017 15:19
Show Gist options
  • Save atsvetkov/54a7a79366dc6d3aabb4ae97af8733f8 to your computer and use it in GitHub Desktop.
Save atsvetkov/54a7a79366dc6d3aabb4ae97af8733f8 to your computer and use it in GitHub Desktop.
void Foo(SomeReferenceType input)
{
if (input == null)
{
throw new ArgumentNullException("input");
}
// if we made it here, input can be safely dereferenced and used
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment