using System;
public class MainClass
{
public enum Color
{
Red = 0,
Orange,
Yellow,
Green,
Blue,
Indigo,
Violet
}
static void Main()
{
Color MyColor;
MyColor = Color.Green;
Console.WriteLine("{0}", MyColor.CompareTo(Color.Red));
Console.WriteLine("{0}", MyColor.CompareTo(Color.Green));
Console.WriteLine("{0}", MyColor.CompareTo(Color.Violet));
}
}
|