how to reference enum in c# with a number code example
Example 1: c# enum syntax
enum State
{
Idle,
Walking,
Running,
Jumping,
Climbing,
Attacking
}
Example 2: c# enum default
enum F
{
// Give each element a custom value
Foo = 1, Bar = 2, Baz = 3, Quux = 0
}