Home » C# Programming » Control Instructions

What is the output of the C#.NET code snippet given below? namespace CuriousTabConsoleApplication { public enum color { red, green, blue }; class SampleProgram { static void Main (string[ ] args) { color c = color.blue; switch (c) { case color.red: Console.WriteLine(color.red); break; case color.green: Console.WriteLine(color.green); break; case color.blue: Console.WriteLine(color.blue); break; } } } }

← Previous Next →

Discussion & Comments

No comments yet. Be the first to comment!