How do I tell if an SPListItem is a document or a folder

Viewed 23614

I have a loop that is looping through a document library like in the example below.

foreach (SPListItem item in DocumentLibrary)
{
}

How do I tell if the SPListItem is a document or a folder?

6 Answers
Related