Created
November 16, 2018 14:00
-
-
Save lsmithmier/fadf4070bdc5b1c5b513477c40fb314d to your computer and use it in GitHub Desktop.
NullCheck
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace SyntaxTester | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
NullCheck nullCheck = null; | |
Console.WriteLine(string.Format("=>{0}", nullCheck==null?"":nullCheck.Message)); | |
nullCheck = new NullCheck { Message = "Test2" }; | |
Console.WriteLine(string.Format("=>{0}", nullCheck == null ? "" : nullCheck.Message)); | |
Console.ReadLine(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment