SPList::GetItems method (SPQuery)

Gets a collection of items from the list based on the specified query.

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

No code example is currently available or this language may not be supported.

Parameters

query
Type: Microsoft.SharePoint.SPQuery

The query that is used to retrieve list items.

Return value

Type: Microsoft.SharePoint.SPListItemCollection
The list items that satisfy the query.

The following example is a console application that gets a collection of items from the Tasks list and prints a report to the console.

No code example is currently available or this language may not be supported.
Show: