Share via


SPFeatureCollection.Add method (Guid, Int32, Boolean, SPFeatureDefinitionScope)

Adds a Feature to the Collection.

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

Syntax

'Declaration
Public Function Add ( _
    featureId As Guid, _
    compatibilityLevel As Integer, _
    force As Boolean, _
    featdefScope As SPFeatureDefinitionScope _
) As SPFeature
'Usage
Dim instance As SPFeatureCollection
Dim featureId As Guid
Dim compatibilityLevel As Integer
Dim force As Boolean
Dim featdefScope As SPFeatureDefinitionScope
Dim returnValue As SPFeature

returnValue = instance.Add(featureId, _
    compatibilityLevel, force, featdefScope)
public SPFeature Add(
    Guid featureId,
    int compatibilityLevel,
    bool force,
    SPFeatureDefinitionScope featdefScope
)

Parameters

  • compatibilityLevel
    Type: System.Int32

    Feature's Compatibility Level

Return value

Type: Microsoft.SharePoint.SPFeature

See also

Reference

SPFeatureCollection class

SPFeatureCollection members

Add overload

Microsoft.SharePoint namespace