Item(String) Property

The Item property of the SPFieldCollection class gets the field with the specified display name from the collection.

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

Parameters

strDisplayName   A string that contains the display name.

Property Value

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

Remarks

Example

The following code example uses an indexer to delete a field from a specified list.

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

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security