Skip to content

Instantly share code, notes, and snippets.

@andrewjamesford
Created February 20, 2012 00:01
Show Gist options
  • Save andrewjamesford/1866649 to your computer and use it in GitHub Desktop.
Save andrewjamesford/1866649 to your computer and use it in GitHub Desktop.
C# Convert int? to int
int value = (nullableValue.HasValue) ? nullableValue.Value : 0 ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment