title: mvc razor performance
body: <p>Are there any differences between those examples in terms of performance</p>
  
  <h2>First</h2>
  
  <p>Difference between this
  </p>
  
  <pre class="lang-cs prettyprint-override"><code>@foreach (...)
  {
      @Html.DisplayFor(...)
  }
  </code></pre>
  
  <p>and that</p>
  
  <pre class="lang-cs prettyprint-override"><code>@foreach (...)
  {
      Html.DisplayFor(...);
  }
  </code></pre>
  
  <h2>Second</h2>
  
  <p>Difference between this
  </p>
  
  <pre class="lang-cs prettyprint-override"><code>@{
      foreach (...)
      {
      }
  
      if(...)
      {
      }
  }
  </code></pre>
  
  <p>and that</p>
  
  <pre class="lang-cs prettyprint-override"><code>@foreach (...)
  {
  }
  
  @if(...)
  {
  }
  </code></pre>