Click here to Skip to main content
15,905,566 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi all can anyone explain me what is the basic use of enums in c# in what scenarios we need of enums

Thank's In advance
Posted

 
Share this answer
 
enums are used to group similar data together.........suppose you want to create program in which you use currencies so value of currencies keep on changing so if you have to use currencies in too many places in a program and you do it by using constants or something else you can get in great problem for changing values everywhere so you just simply change the values in the enumeration scope and it gets changed everywhere in the program...........




you can get further details from this link

http://msdn.microsoft.com/en-us/library/sbbt4032.aspx[

Regards,
Ahsan Naveed
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900