共用方式為


ISharePointProjectFeatureCollection.Add 方法 (String, Boolean)

使用指定的功能名稱,新增功能。

命名空間:  Microsoft.VisualStudio.SharePoint
組件:  Microsoft.VisualStudio.SharePoint (在 Microsoft.VisualStudio.SharePoint.dll 中)

語法

'宣告
Function Add ( _
    featureName As String, _
    skipAutoPackage As Boolean _
) As ISharePointProjectFeature
ISharePointProjectFeature Add(
    string featureName,
    bool skipAutoPackage
)

參數

  • skipAutoPackage
    型別:System.Boolean
    如果為 true,請不要將功能新增至專案套件。

傳回值

型別:Microsoft.VisualStudio.SharePoint.ISharePointProjectFeature
表示某項功能的物件。

例外狀況

例外狀況 條件
CheckoutException

當無法簽出專案或封裝檔時發生。

.NET Framework 安全性

請參閱

參考

ISharePointProjectFeatureCollection 介面

Add 多載

Microsoft.VisualStudio.SharePoint 命名空間