FeatureCollection.Add method

Adds the feature to the collection of activated features and returns the added feature.

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

Syntax

'Declaration
Public Function Add ( _
    featureId As Guid, _
    force As Boolean, _
    featdefScope As FeatureDefinitionScope _
) As Feature
'Usage
Dim instance As FeatureCollection
Dim featureId As Guid
Dim force As Boolean
Dim featdefScope As FeatureDefinitionScope
Dim returnValue As Feature

returnValue = instance.Add(featureId, _
    force, featdefScope)
public Feature Add(
    Guid featureId,
    bool force,
    FeatureDefinitionScope featdefScope
)

Parameters

  • featureId
    Type: System.Guid

    The feature identifier of the feature to be added.

    It must not be a null reference (Nothing in Visual Basic).

  • force
    Type: System.Boolean

    Specifies whether to overwrite an existing feature with the same feature identifier.

    This parameter is ignored if there are no errors.

Return value

Type: Microsoft.SharePoint.Client.Feature
Returns a Feature instance representing addition of the feature to the collection of activated features and returns the added feature.

See also

Reference

FeatureCollection class

FeatureCollection members

Microsoft.SharePoint.Client namespace