FeatureCollection.Remove Method

Removes the feature from the collection of features.

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 Sub Remove ( _
    featureId As Guid, _
    force As Boolean _
)
'Usage
Dim instance As FeatureCollection
Dim featureId As Guid
Dim force As Boolean

instance.Remove(featureId, force)
[RemoteAttribute]
public void Remove(
    Guid featureId,
    bool force
)

Parameters

  • featureId
    Type: System.Guid

    The feature identifier of the feature to be removed.

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

  • force
    Type: System.Boolean

    Specifies whether to force the operation to continue even if there are errors.

    This parameter is ignored if there are no errors.

Exceptions

Exception Condition
InvalidOperationException

The feature is not an activated feature or the feature cannot be deactivated and the force parameter was not set to true. Error code: -1.

UnauthorizedAccessException

The current user has insufficient permissions. Error code: -2147024891.

See Also

Reference

FeatureCollection Class

FeatureCollection Members

Microsoft.SharePoint.Client Namespace