Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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
)

Parameters

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.

Show:
© 2015 Microsoft