Tag Info

New answers tagged


Instead of using SPFile object use the SPListItem in foreach loop. And within the loop we can use the File property of SPListItem to get the SPFile object. Try the below code... foreach (SPListItem item in items){ SPFile file = item.File; if(docmanager.getFileExtension(item) == ".pdf"){ if (file.LockId != null){ ...


SPListItemCollection is a collection of SPListItem. Get File object from SPListItem. Example: foreach (SPListItem item in items) { SPFile file = item.File; }

Top 50 recent answers are included