Category Archives: TypeMock

Does iterating through SPList.Items using foreach affect performance?

Iterating through SPList.Items using a for (int i) loop is bad for performance, as each call to SPList.Items causes a trip to the DB and will retrieve all items. See I have always wondered whether using a foreach loop … Continue reading

Posted in SharePoint, TypeMock | Leave a comment