.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Post New Resource Bookmark and Share   

Enum position of the week day

Posted By:laptop charles       Posted Date: August 31, 2010    Points: 10    Category:    URL: http://www.dotnetspark.com  

Position of the week day
 

C#.net Enum concept.
using System;
using System.Collections.Generic;
using System.Text;

namespace Enum
{
    class Program
    {
        public enum Week
        {
            Sunday = 1, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
        }

        static void Main(string[] args)
        {
            Console.WriteLine((int)Week.Sunday);
            Console.WriteLine((int)Week.Monday);
            Console.WriteLine((int)Week.Tuesday);
            Console.WriteLine((int)Week.Wednesday);
            Console.WriteLine((int)Week.Thursday);
            Console.WriteLine((int)Week.Friday);
            Console.WriteLine((int)Week.Saturday);
            Console.ReadLine();
        }
    }
}

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend