SPFile.Item property

Gets the list item object that corresponds to the file if the file belongs to a document library.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public SPListItem Item { get; }

Property value

Type: Microsoft.SharePoint.SPListItem
An SPListItem object that represents the list item.

The Item property throws an exception if the document does not belong to a document library.

Show: