What is ENUM?

Answer Posted / nishesh

ENUM is a user defined data type. and it is declared to hold constant values for a set of data
example

enum days {sun,mon,tue,wed,thur,fri,sat}

will assign values like this
sun=0
mon=1
tue=2
and so on
if we want to use that series then we can do like this

int First_day=(int)days.sun;

it will give

First_day = 0

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the Difference between the public and private ?

520


Could you explain the difference between func vs action vs predicate?

461


Is c# difficult to learn?

487


What is the advantage of generics in c#?

507


What's the c# syntax to catch any possible exception?

493






What are the two uses of a ‘using’ statement in c#?

476


What is gui in c#?

548


Can you see a loop recorder?

499


How to find the current application file path while runtime?

507


What is meant by generics in c#?

502


What is public void in c#?

511


What is a service layer c#?

471


What is the difference between console and windows application?

453


Is c# pass by value?

489


What is lazy t?

510