title: How do I tell if an SPListItem is a document or a folder
body: <p>I have a loop that is looping through a document library like in the example below.</p>
  
  <pre><code>foreach (SPListItem item in DocumentLibrary)
  {
  }
  </code></pre>
  
  <p>How do I tell if the <code>SPListItem</code> is a document or a folder?</p>