SPFile.GetListItem method

Gets the SPListItem that corresponds to this file, if this file belongs to a document library. Also gets values for specified fields.

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

public SPListItem GetListItem(
	params string[] fields


Type: []

List of fields for which to get values. Sending a blank string causes none of the fields to be fetched. This parameter cannot be a null reference (Nothing in Visual Basic).

Return value

Type: Microsoft.SharePoint.SPListItem
The list item that contains the file object.

This function is equivalent to SPFile.Item except that this version is more efficient because only specified field values are fetched.