SPList::GetItems method (String[])
SharePoint 2013
Returns a collection of items from the list but includes only the specified field values.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Parameters
- fields
- Type: []
A variable number of field names for which to get values. If all fields should be retrieved, use the Items property instead.
| Exception | Condition |
|---|---|
| ArgumentNullException | fields is null . |
This method creates a new SPQuery object from the specified fields and calls the GetItems(SPQuery) method with that new object to get the items.
This method is more efficient than accessing the Items property because it only fetches the values for the specified fields.
Show: