Share via


FeatureCollection.Remove method

Removes the feature from the collection of features.

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

Syntax

'Declaration
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)
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