共用方式為


ISharePointProjectFeatureCollection.Add Method (String)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Adds a new feature using the specified feature name.

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

Syntax

'Declaration
Function Add ( _
    featureName As String _
) As ISharePointProjectFeature
ISharePointProjectFeature Add(
    string featureName
)

Parameters

Return Value

Type: Microsoft.VisualStudio.SharePoint.ISharePointProjectFeature
An object representing a feature.

Exceptions

Exception Condition
CheckoutException

Occurs when the project file cannot be checked out

.NET Framework Security

See Also

Reference

ISharePointProjectFeatureCollection Interface

Add Overload

Microsoft.VisualStudio.SharePoint Namespace