问题描述
我有一个枚举像这样的枚举
枚举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),其中联邦的值是1等
对于wi_3k_1,它的值现在为23,可以再添加一个字段,在最后一个
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
推荐答案
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)
只需在末尾添加xyz=61
(如上所示).
Just added xyz=61
at the end (as shown above).
这篇关于asp.net中的枚举问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!