I want to check If deleted item is the Last Item deleted in the List in following method,
public override void ItemDeleted(SPItemEventProperties properties)
{
}
I know I can get web url using properties.WebUrl and then find list and then items count in it, but is there any better way of doing it ?
If item wasn't the last one then I can go through all List Items to find the List Item that was added nearest to DateTime.Now, but then I Can go through each list item and compare there dates, Does anyone knows any efficient way ?
EDIT
I find LastItemModifiedDate property to get last item, so don't need to go through each list item to find the latest added to the list
EDIT 2
I said I can get Last Item, but in real I am able to get last Item modified date, so only thing I know is to go through all items to find one I want :S, I bet there will be a better way
