c# - How to select next enum value ? -
this question has answer here:
- how next (or previous) enum value in c# 20 answers
i've c# enum type:
private enum dayname { monday=1, tuesday=2 ... sunday=7 }; private dayname today ; today = dayname.friday;
how like:
today ++ ; print(today) ->
and "saturday" ?
well first set today = dayname.friday
, print(today.tostring()
after today ++ ;
as descirbed @ post, enum string name value
Comments
Post a Comment