ListNet Control

Item(Int32) Property

SharePoint 2003

The Item property of the SPFieldCollection class gets the field object at the specified index in the collection.

[C#] In C#, this property is an indexer for the SPFieldCollection class.


iIndex   A 32-bit integer that specifies the index of the field.

Property Value

A Microsoft.SharePoint.SPField object that represents the field.


The Item property throws an ArgumentOutOfRangeException if the specified index is outside the valid range of indices for the collection.


The following code example iterates through the collection of fields for a list and displays the title and type of each field.

This example requires using directives (Imports in Visual Basic) for the Microsoft.SharePoint, Microsoft.SharePoint.Utilities, and Microsoft.SharePoint.WebControls namespaces.

The example assumes the existence of a .aspx page that contains a label control.


Platforms: Microsoft Windows Server 2003

Security: Code Access Security

© 2015 Microsoft