I am using in c#
item = list.GetItemById(40);
This throws error if the item with id 40 doe snto exists. I do not want to use try catch. Please advise how can I check if the item exists using GetItemByid before getting the item. Thanks.
Item does not exist. It may have been deleted by another user.
at Microsoft.SharePoint.SPList.GetItemById(String strId, Int32 id, String strRootFolder, Boolean cacheRowsetAndId, String strViewFields, Boolean bDatesInUtc, Boolean bExpandQuery)