locked
enum - what is it? RRS feed

  • Question

  • User-2070201957 posted

    Could please somebody explain to me, what enum is, what it is used for and how?

     

    Thursday, January 17, 2008 6:28 AM

Answers

  • User121873360 posted

    enumaration is a set of related items with integer index.

     

    for example Suffix

    public enum suffix

              mr.

              Mis.

              Miss.

    end enum

     

    when we assign it to any var then  var_name=suffix.Mr. or suffix.mis. or suffix.miss it display

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 17, 2008 7:36 AM
  • User-1509636757 posted

    Try googling for enums; you would find loots of helpful links...

    some of them are >


    Referenced Link > enums in C# - Google Search

     



    hope it helps./.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 17, 2008 7:42 AM
  • User1568789104 posted

     Hi,

        enums are pre-defined, finite set of values that are grouped together as enumeration.

    http://msdn.microsoft.com/en-us/library/sbbt4032(VS.80).aspx 

     This link would explain you about it in detail.

    regards

    Prince.D
     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, January 25, 2008 3:08 AM

All replies

  • User121873360 posted

    enumaration is a set of related items with integer index.

     

    for example Suffix

    public enum suffix

              mr.

              Mis.

              Miss.

    end enum

     

    when we assign it to any var then  var_name=suffix.Mr. or suffix.mis. or suffix.miss it display

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 17, 2008 7:36 AM
  • User-1509636757 posted

    Try googling for enums; you would find loots of helpful links...

    some of them are >


    Referenced Link > enums in C# - Google Search

     



    hope it helps./.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 17, 2008 7:42 AM
  • User-2070201957 posted

     Thank you Kaushal, that was great help [Yes]

    Thursday, January 17, 2008 7:56 AM
  • User1568789104 posted

     Hi,

        enums are pre-defined, finite set of values that are grouped together as enumeration.

    http://msdn.microsoft.com/en-us/library/sbbt4032(VS.80).aspx 

     This link would explain you about it in detail.

    regards

    Prince.D
     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, January 25, 2008 3:08 AM