SPListItem.Item property (Int32)

Gets or sets the value that is contained by the field at the specified index in the field collection of the parent list.

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

public override Object this[
	int index
] { get; set; }

Parameters

index
Type: System.Int32

A 32-bit integer that specifies the index of the field in the parent list.

Property value

Type: System.Object
An object that contains the field value.

ExceptionCondition
ArgumentOutOfRangeException

The specified index is outside the valid range of indices for the collection.

For information about the field types that are used in SharePoint Foundation and how they relate to .NET types, see the SPListItem class.

Important noteImportant

To improve performance and optimize the number of SQL Server queries that SharePoint Foundation must execute, use the GetItems method of the SPList class to retrieve items that are based on the value of their fields. The GetItems method allows you to specify search criteria by passing a Collaborative Application Markup Language (CAML) query through the SPQuery or SPView class. In addition, list performance may be compromised if a list contains an unnecessarily large number of fields.

Show: