Share via


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)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public ReadOnly Property Item As SPListItem
    Get
'Usage
Dim instance As SPFile
Dim value As SPListItem

value = instance.Item
public SPListItem Item { get; }

Property Value

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

Remarks

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

See Also

Reference

SPFile Class

SPFile Members

Microsoft.SharePoint Namespace