What is enum?

  • Thread starter Thread starter Blue Man
  • Start date Start date
B

Blue Man

i'm confused! what exactly is this function type and where should i use it?
appreciate any answers, clear article or anything.
 
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).
 
C# Learner said:
An enumeration is a type which has a finite set of *possible* values
defined either implicitly or explicitly when it's created.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Enum TypeConverter 3
about enum 3
enum type 3
Merge Info From Two Enums 1
Enum Extentions 7
Enum Question 1
Enums & Constructors? 4
number of values in enum 2

Back
Top