Thursday, February 27, 2014

Enumeration

Enumerations

  • An enumeration is a collection of constants. That means you can create your own set of named constants by using enumerations.
  • Each constant will have a name with an integer value.
  • Syntax for Enumeration Declaration:
           public enum enumname
              {
               Constant1 = value1, Constant2 = value2, Constant3 = value3 
              }



  • Syntax for usage
  •            enumname.constantname




    Download above code of Enumeration Demo : Download Links

    No comments:

    Post a Comment

    Flag Counter