An Enumeration is very similar to a constant.
|
1 2 3 4 5 6 7 8 9 10 |
enum Command { MOVE = 1, STOP = 2, RIGHT = 3, LEFT = 4, } //now we can send a command... SendCommand(Command.LEFT); SendCommand(Command.STOP); |
An Enumeration is very similar to a constant.
|
1 2 3 4 5 6 7 8 9 10 |
enum Command { MOVE = 1, STOP = 2, RIGHT = 3, LEFT = 4, } //now we can send a command... SendCommand(Command.LEFT); SendCommand(Command.STOP); |