Skip to content

Instantly share code, notes, and snippets.

@tnngo2
Created May 4, 2012 07:24
Show Gist options
  • Save tnngo2/2592857 to your computer and use it in GitHub Desktop.
Save tnngo2/2592857 to your computer and use it in GitHub Desktop.
using System;
namespace Theory_9
{
class Numbers
{
static void Main(string[] args)
{
System.Nullable<int> numOne = 10;
System.Nullable<int> numTwo = null;
System.Nullable<int> result = numOne + numTwo;
if (result.HasValue == true)
{
Console.WriteLine("Result: " + result);
}
else
{
Console.WriteLine("Result: null");
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment