共用方式為


SPFeatureCollection.Remove method (Guid, Boolean)

從集合中移除具有指定 GUID 的功能,並選擇性地略過錯誤。

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

Syntax

'宣告
Public Sub Remove ( _
    featureId As Guid, _
    force As Boolean _
)
'用途
Dim instance As SPFeatureCollection
Dim featureId As Guid
Dim force As Boolean

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

參數

  • featureId
    Type: System.Guid

    若要移除功能的識別碼。

  • force
    Type: System.Boolean

    true以強制執行此作業,並忽略錯誤;否則, false。

Exceptions

Exception Condition
InvalidOperationException

此功能就不會啟動。

ArgumentException

找不到功能時發生錯誤。

-或-

功能尚未安裝,且未指定強制作業。

備註

之後它已從集合中移除它,則這個方法會停用指定的功能。

請參閱

參照

SPFeatureCollection class

SPFeatureCollection members

Remove overload

Microsoft.SharePoint namespace