A few questions

Mar 8, 2007 at 12:17 AM
why don't you add this as a feature in my utility pack? http://www.codeplex.com/spstipsUtilityPack

also, you are doing extra loops. why not, instead of using two "foreach" loops, use one "while" loop:

instead of:

foreach (SPListItem item in list.Items)
hItems.Add(item.ID,null);
foreach (int ID in hItems.Keys)
list.Items.DeleteItemById(ID);

do :
while(list.Items.Count>0)
list.Items0.Delete();