State Machine Example I created this code to see how I can implement simple state machine in C#. StateTransition.cs contains state transition logic.