title: C# - Foreach loop with if statement
body: <p>How can I go about doing this so if the "if" statement is true, to skip the code below the foreach loop and to go on with the rest of the program</p>
  
  <pre><code>void()
  {
      foreach()
      {
          if()
          {
  
          }
      }
  
      //code I want to skip if "if" statement is true
  
  }
  </code></pre>