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.GuidThe feature identifier of the feature to be added.
It must not be a null reference (Nothing in Visual Basic).
force
Type: System.BooleanSpecifies whether to overwrite an existing feature with the same feature identifier.
This parameter is ignored if there are no errors.
featdefScope
Type: Microsoft.SharePoint.Client.FeatureDefinitionScopeThe feature scope for this feature.
It must have the value of FeatureDefinitionScope.Site or FeatureDefinitionScope.Farm.
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.