Share via


ToStringCollection Method

The ToStringCollection method of the SPViewFieldCollection class loads the names of the view fields into a StringCollection object.

Return Value

A System.Collections.Specialized.StringCollection object that contains the names of the view fields.

Example

The following code example loads the view fields of a list view into a StringCollection object and iterates through the the collection to display the name of each field.

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

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security