title: Simple state machine example in C#?
body: <p><strong>Update:</strong></p>
  <p>Again thanks for the examples, they have been very helpful and with the following, I don't mean
  to take anything away from them.</p>
  <p>Aren't the currently given examples, as far as I understand them &amp; state-machines, only half of what we usually understand by a state-machine?<br />
  In the sense that the examples do change state but that's only represented by changing the value of a variable (and allowing different value- changes in different states), while usually, a state machine should also change its behavior, and behavior not (only) in the sense of allowing different value changes for a variable depending on the state, but in the sense of allowing different methods to be executed for different states.</p>
  <p>Or do I have a misconception of state machines and their common use?</p>
  <hr />
  <p><strong>Original question:</strong></p>
  <p>I found this discussion about <a href="https://stackoverflow.com/questions/1406986/does-c-include-finite-state-machines">state machines &amp; iterator blocks in c#</a> and tools to create state machines and whatnot for C#, so I found a lot of abstract stuff but as a noob, all of this is a little confusing.</p>
  <p>So it would be great if someone could provide a C# source code-example that realizes a simple state machine with perhaps 3,4 states, just to get the gist of it.</p>