Enum C# with Example



Enum C# with Example

 	using System;

	namespace CSharpIntermediateConstructsEnum
	{
		enum DaysByName { Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday }
		
		class Enum
		{
			static void Main(string[] args)
			{
				DaysByName today = DaysByName.Sunday;
				Console.WriteLine("Today is : {0}", today);
				Console.WriteLine("4 * 6 = {0}", DaysByName.Thursday * DaysByName.Saturday);
			}
		}
	}
 

0 Comment's

Comment Form

Submit Comment