Partager via


SPFormCollection Class

The SPFormCollection class represents a collection of SPForm objects.

System.Object

   Microsoft.SharePoint.SPBaseCollection

      Microsoft.SharePoint.SPFormCollection

Public Properties

The following table shows the public properties of the SPFormCollection class, the data type of each property, and a brief description of each.

Name Data Type Description
Count Int32 Gets the number of forms in the collection.
Item(Int32) Microsoft.SharePoint.SPForm Gets the form object at the specified index in the collection.
Item(Microsoft.SharePoint.PAGETYPE) Microsoft.SharePoint.SPForm Gets the form of the specified type from the collection.
Item(String) Microsoft.SharePoint.SPForm Gets the form located at the specified URL from the collection.
List Microsoft.SharePoint.SPList Gets the parent list of the form.
SchemaXml String Gets the XML schema that defines the collection.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread safe.

Remarks

Use the Forms property of the SPList class to return the collection of forms for a list.

Use an indexer to return a single form from the collection. For example, assuming the collection is assigned to a variable named myForms, use myForms[index] in C#, or myForms(index) in Visual Basic .NET, where index is either the index number of the form in the collection or the site-relative URL of the form.

Requirements

Namespace: Microsoft.SharePoint

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services (in Microsoft.SharePoint.dll)

Security: Code Access Security