Share via


SPModuleCollection Class

Represents a collection of SPModule objects.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPAutoSerializingObject
    Microsoft.SharePoint.SPBaseCollection
      Microsoft.SharePoint.SPModuleCollection

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public Class SPModuleCollection _
    Inherits SPBaseCollection

Dim instance As SPModuleCollection
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public class SPModuleCollection : SPBaseCollection

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 Microsoft Visual C#, or myModules(index) in Microsoft Visual Basic, where index is the index number of the module in the collection.

Thread Safety

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

See Also

Reference

SPModuleCollection Members

Microsoft.SharePoint Namespace