Created
June 27, 2016 01:59
-
-
Save theunrepentantgeek/065723944d5a3af5620c461e811310c7 to your computer and use it in GitHub Desktop.
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Demo | |
{ | |
enum OriginShow | |
{ | |
None, | |
StarWars, | |
StarTrek, | |
Stargate, | |
Babylon5, | |
DrWho | |
} | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
OriginShow? origin = null; | |
Console.WriteLine(origin == OriginShow.StarTrek); // False | |
Console.WriteLine(origin == OriginShow.Stargate); // False | |
Console.WriteLine(origin == null); // True | |
origin = OriginShow.Stargate; | |
Console.WriteLine(origin == OriginShow.StarTrek); // False | |
Console.WriteLine(origin == OriginShow.Stargate); // True | |
Console.WriteLine(origin == null); // False | |
Console.ReadLine(); | |
} | |
void Write(bool value) | |
{ | |
Console.WriteLine(value: value.ToString()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment