Enum in C#

using System;

namespace Enum
{
    public enum Season { WINTER, SPRING, SUMMER, FALL }
    class Program
    {

        static void Main(string[] args)
        {
            int x = (int)Season.WINTER;
            int y = (int)Season.SUMMER;

            Console.WriteLine("Winter"+x);
            Console.WriteLine("Summer"+y);

            Console.ReadKey();
        }
    }
}

 

It would be a great help, if you support by sharing :)
Author: zakilive

Leave a Reply

Your email address will not be published.