Enumerations:The System.Enum Type

image_pdfimage_print

   
  
using System;

enum Color
{
    red,
    green,
    yellow
}

public class TheSystemEnumType1
{
    public static void Main()
    {
        Color c = Color.red;
        
        Console.WriteLine("c is {0}", c);
    }
}
           
         
    
     


This entry was posted in Data Types. Bookmark the permalink.