Compartilhar via


SPModuleCollection Class

The SPModuleCollection class represents a collection of SPModule objects.

System.Object

   Microsoft.SharePoint.SPBaseCollection

      Microsoft.SharePoint.SPModuleCollection

Public Properties

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

Name Data Type Description
Count Int32 Gets the number of modules in the collection.
Item Microsoft.SharePoint.SPModule Gets the module object at the specified index in the collection.
Web Microsoft.SharePoint.SPWeb Gets the parent site of 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 Modules property of the SPWeb class to return the collection of modules for a site. Use an indexer to return a single module from the collection. For example, if the collection is assigned to a variable named myModules, use myModules[index] in C#, or myModules(index) in Visual Basic .NET, where index is the index number of the module in the collection.

Requirements

Namespace: Microsoft.SharePoint

Platforms: Microsoft Windows Server 2003

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

Security: Code Access Security