I've a C# enum type:
private enum DayName {
Monday=1, Tuesday=2 ... Sunday=7 };
private DayName today
;
today =
DayName.Friday;
How to
do something like:
today ++
;
print(today) ->
and get "Saturday" ?
style="font-weight: bold;">
Answer
Well first set today =
and then
DayName.Fridayprint(today.ToString()
after the today ++ ;
As
descirbed at this SO post, href="https://stackoverflow.com/questions/309333/enum-string-name-from-value">Enum
String Name from Value
No comments:
Post a Comment