create enum with id c# code example
Example 1: convert int to enum c#
YourEnum foo = (YourEnum)yourInt;
Example 2: c# enum syntax
enum State
{
Idle,
Walking,
Running,
Jumping,
Climbing,
Attacking
}
YourEnum foo = (YourEnum)yourInt;
enum State
{
Idle,
Walking,
Running,
Jumping,
Climbing,
Attacking
}