Enum Values : Enum : Data Types C# Source Code


Custom Search

C# Source Code » Data Types » Enum »

 

Enum Values









    

/*
Learning C# 
by Jesse Liberty

Publisher: O'Reilly 
ISBN: 0596003765
*/
public class EnumValues
 {
    // declare the enumeration
    enum Temperatures
    {
       WickedCold = 0,
       FreezingPoint = 32,
       LightJacketWeather = 60,
       SwimmingWeather = 72,
       BoilingPoint = 212,
    }

    static void Main( )
    {

       System.Console.WriteLine("Freezing point of water: {0}",
          (int) Temperatures.FreezingPoint );
       System.Console.WriteLine("Boiling point of water: {0}",
          (int) Temperatures.BoilingPoint );
    }
 }

           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Data Types
» Enum