我是C#枚举类型:
private enum DayName { Monday=1, Tuesday=2 ... Sunday=7 };
private DayName today ;
today = DayName.Friday;
如何做以下事情:
today ++ ;
print(today) ->
得到"星期六" ?
答案 0 :(得分:0)
首先设置today = DayName.Friday
,然后设置print(today.ToString()
today ++ ;
正如此帖所述,Enum String Name from Value