FeatureCollection.Add Method

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

Namespace:  Microsoft.SharePoint.Client
Assemblies:   Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

Syntax

'Declaration
<RemoteAttribute> _
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)
[RemoteAttribute]
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