At the moment I am trying to delete list item file using this code,
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite site = new SPSite(properties.WebUrl))
{
using (SPWeb web = site.OpenWeb())
{
SPListItem Item = web.GetListItem(ListURL + fileName);
Item.Delete();
}
}
});
but I need to do validations if item exists or not, I know I can iterate list items but is there any easy way of checking if item exists using URL of item.