Click here to Skip to main content
15,898,036 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi I have enum which is intialised like this

enum FormTypes {Federal=1,CA_565,CA_592B,IL_K1,CO_0108,CT_K1,GA_G2A,IN_WH18,MI_4119,
NC_K1,
PA_RK1,PA_NRK1,PA_SchHCorp,WV_NRW2, NY_IT204CP,NY_IT204IP,NJ_K1_B,OK_500B,
MA_K1,AR_1099PT,
KY_PTE_WH,CA_568,KY_765,VA_502_VK1,WI_3K_1) where federal is given with the value 1 etc

for wi_3k_1 it is having the value 23 now can add one more field giving the value as xyz=61 at the last
Posted
Comments
Philippe Mori 3-Sep-11 8:01am    
If you were able to find that you can initialize the first value to 1, it should not have been that hard to find how to initialize the last value with 61.

So go ahead and do that. The only requirementS for enums is that each value has a unique name and ordinal value.
 
Share this answer
 
enum FormTypes {Federal=1,CA_565,CA_592B,IL_K1,CO_0108,CT_K1,GA_G2A,IN_WH18,MI_4119,
NC_K1,
PA_RK1,PA_NRK1,PA_SchHCorp,WV_NRW2, NY_IT204CP,NY_IT204IP,NJ_K1_B,OK_500B,
MA_K1,AR_1099PT,
KY_PTE_WH,CA_568,KY_765,VA_502_VK1,WI_3K_1,
xyz=61) 


Just added xyz=61 at the end (as shown above).
 
Share this answer
 
v2

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