Share via


SPModule Class

Represents the collection of files and views that are used in a site template.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.SPModule

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

Syntax

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

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

Remarks

Use the Modules property of the SPWeb class to return the collection of modules for a site, and 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 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

SPModule Members

Microsoft.SharePoint Namespace