What is enum?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Blue Man

    What is enum?

    i'm confused! what exactly is this function type and where should i use it?
    appreciate any answers, clear article or anything.




  • Mario Aguilera

    #2
    Re: What is enum?

    Enum is basic blue man, it's a concept you should know very well if you've
    ever programmed. Enum allows you to define your own enumerated types. So you
    can have weekdays = (monday, tuesday, wed... etc) where monday would be 0,
    tuesday would be 1, and so on... this makes your code easier to read when
    you intend to use integers to represent options. ie: instead of if(option ==
    3) you'd have if(option == thursday).

    "Blue Man" <blueman_blog@n ospam.com> wrote in message
    news:uwkqwvTAEH A.2180@TK2MSFTN GP09.phx.gbl...[color=blue]
    > i'm confused! what exactly is this function type and where should i use[/color]
    it?[color=blue]
    > appreciate any answers, clear article or anything.
    >
    >
    >
    >[/color]


    Comment

    • C# Learner

      #3
      Re: What is enum?

      Blue Man wrote:
      [color=blue]
      > i'm confused! what exactly is this function type and where should i use it?
      > appreciate any answers, clear article or anything.[/color]

      An enumeration is a type which has a finite set of *possible* values
      defined either implicitly or explicitly when it's created.

      Check this article out:

      Comment

      • Brad Williams

        #4
        Re: What is enum?

        It's is not a function type, an enum is a type whose domain is a set of
        named integral-type constants. Good examples in the docs:
        Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.



        "Blue Man" <blueman_blog@n ospam.com> wrote in message
        news:uwkqwvTAEH A.2180@TK2MSFTN GP09.phx.gbl...[color=blue]
        > i'm confused! what exactly is this function type and where should i use[/color]
        it?[color=blue]
        > appreciate any answers, clear article or anything.
        >
        >
        >
        >[/color]


        Comment

        • C# Learner

          #5
          Re: What is enum?

          C# Learner wrote:
          [color=blue]
          > Blue Man wrote:
          >[color=green]
          >> i'm confused! what exactly is this function type and where should i
          >> use it?
          >> appreciate any answers, clear article or anything.[/color]
          >
          >
          > An enumeration is a type which has a finite set of *possible* values
          > defined either implicitly or explicitly when it's created.[/color]

          "when it (the enumeration) is defined", rather.

          Comment

          Working...