Currently I am using a foreach loop to find the item I want by its title using the following code:
SPList list = web.Lists.TryGetList("DocumentLibrary");
foreach (SPListItem item in list.Items)
{
if (item.Title == "Title")
return true;
}
Is there a faster way to do this? Perhaps a CAML query?