Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Creates and adds a new instance of SharePoint project item.
Namespace: Microsoft.VisualStudio.SharePoint
Assembly: Microsoft.VisualStudio.SharePoint (in Microsoft.VisualStudio.SharePoint.dll)
Syntax
'Declaration
Function Add ( _
path As String, _
name As String, _
projectItemType As String _
) As ISharePointProjectItem
ISharePointProjectItem Add(
string path,
string name,
string projectItemType
)
Parameters
path
Type: StringThe subfolder in the project where the new SharePoint item is created.
name
Type: StringThe name of SharePoint project item to be added.
projectItemType
Type: StringThe type ID of the SharePoint project item to be added.
Return Value
Type: Microsoft.VisualStudio.SharePoint.ISharePointProjectItem
An instance of the SharePoint project item that was added.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | Occurs if any of the arguments are nulla null reference (Nothing in Visual Basic). |
| ArgumentException | Occurs in the following cases:
|
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.