title: How to loop through all enum values in C#?
body: <blockquote>
    <p><strong>This question already has an answer here:</strong><br>
    <a href="https://stackoverflow.com/questions/105372/how-to-enumerate-an-enum">How do I enumerate an enum in C#?</a>  <em>26 answers</em></p>
  </blockquote>
  
  
  
  <pre><code>public enum Foos
  {
      A,
      B,
      C
  }
  </code></pre>
  
  <p>Is there a way to loop through the possible values of <code>Foos</code>?</p>
  
  <p>Basically?</p>
  
  <pre><code>foreach(Foo in Foos)
  </code></pre>