Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace MyNamespace
- {
- class Program
- {
- // Enumeration
- enum MyEnum
- {
- Start = 1,
- Stop = 2,
- Pause = 3,
- End = 2
- }
- static void Main()
- {
- MyEnum x = MyEnum.Pause;
- f(x);
- }
- static void f(MyEnum a)
- {
- if (a == MyEnum.Start)
- {
- System.Console.WriteLine("Start");
- }
- else if (a == MyEnum.Pause)
- {
- System.Console.WriteLine("Pause");
- }
- else if (a == MyEnum.Stop)
- {
- System.Console.WriteLine("Stop");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment