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

Can properties be private in c#?

470


What do you mean by object pooling?

519


How will you deploy the dll file in gac?

479


What is difference between float and decimal?

499


For methods inside the interface why can’t you specify the accessibility modifier?

543






What is pure abstract class in c#?

447


Is enum a value type c#?

520


Is struct object oriented?

470


What do you mean by jagged arrays in c#?

473


What do you mean by abstract class in c#?

495


What is the difference between values and reference types?

515


What is the class in c#?

481


What is virtual class in C#?

539


How does a while loop work?

469


What are modifiers in c#?

464