c# int enum code example
Example 1: c# enum syntax
enum State
{
Idle,
Walking,
Running,
Jumping,
Climbing,
Attacking
}
Example 2: enums c#
enum Season
{
Spring,
Summer,
Autumn,
Winter
}
Example 3: get enum value c#
int something = (int) Question.Role;