Enum declare and use it : Enum : Data Types C# Source Code


Custom Search

C# Source Code » Data Types » Enum »

 

Enum declare and use it









    

/*
 * C# Programmers Pocket Consultant
 * Author: Gregory S. MacBeth
 * Email: gmacbeth@comporium.net
 * Create Date: June 27, 2003
 * Last Modified Date:
 */
using System;

namespace Client.Chapter_3___Structs__Enums__Arrays_and_Classes
{
  enum DaysOfWeek
  {
    Monday,
    Tuesday,
    Wednesday,
    Thursday,
    Friday,
    Saturday,
    Sunday
  }
  public class EnumsChapter_3___Structs__Enums__Arrays_and_Classes
  {
    static void Main(string[] args)
    {
      DaysOfWeek Today = DaysOfWeek.Monday;

      Console.WriteLine(Today);
    }
  }
}

           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Data Types
» Enum