ISharePointProjectItemCollection.Add 方法 (String, String, Boolean)
建立並加入 SharePoint 專案項目的新執行個體。
命名空間: Microsoft.VisualStudio.SharePoint
組件: Microsoft.VisualStudio.SharePoint (在 Microsoft.VisualStudio.SharePoint.dll 中)
語法
'宣告
Function Add ( _
name As String, _
projectItemType As String, _
skipAutoPackage As Boolean _
) As ISharePointProjectItem
ISharePointProjectItem Add(
string name,
string projectItemType,
bool skipAutoPackage
)
參數
- name
型別:System.String
要加入之 SharePoint 專案項目的名稱。
- projectItemType
型別:System.String
要加入之 SharePoint 專案項目的型別識別碼。
- skipAutoPackage
型別:System.Boolean
如果為 true,則略過自動加入至第一個可用功能。
傳回值
型別:Microsoft.VisualStudio.SharePoint.ISharePointProjectItem
已加入之 SharePoint 專案項目的執行個體。
例外狀況
例外狀況 | 條件 |
---|---|
ArgumentNullException | 如果有任何引數是 nullNull 參照 (即 Visual Basic 中的 Nothing),就會發生。 |
ArgumentException | 會發生於下列狀況:
|
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。