Enum Manual Number Setup C# with Example



Enum Manual Number Setup C# with Example

 	using System;

	namespace CSharpIntermediateConstructsEnum
	{
		enum MonthName { Jan=1, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec }
		
		class EnumManualNumberSetup
		{
			static void Main(string[] args)
			{
				DateTime today = new DateTime(2013, (int)MonthName.May, 10);
				Console.WriteLine("Date of Today: {0}", today);
			}
		}
	}
 

0 Comment's

Comment Form