共用方式為


IVsDataViewHierarchy.InsertItem 方法 (Int32, IVsDataViewSelectionInfo, Int32, array<Object[])

插入指定的節點和它的子節點,如果有的話,在指定的父節點下方。

命名空間:  Microsoft.VisualStudio.Data.Services.SupportEntities
組件:  Microsoft.VisualStudio.Data.Services (在 Microsoft.VisualStudio.Data.Services.dll 中)

語法

'宣告
Function InsertItem ( _
    parentItemId As Integer, _
    childSelectionInfo As IVsDataViewSelectionInfo, _
    newItemId As Integer, _
    identifier As Object() _
) As Boolean
bool InsertItem(
    int parentItemId,
    IVsDataViewSelectionInfo childSelectionInfo,
    int newItemId,
    Object[] identifier
)
bool InsertItem(
    int parentItemId, 
    IVsDataViewSelectionInfo^ childSelectionInfo, 
    int newItemId, 
    array<Object^>^ identifier
)
abstract InsertItem : 
        parentItemId:int * 
        childSelectionInfo:IVsDataViewSelectionInfo * 
        newItemId:int * 
        identifier:Object[] -> bool
function InsertItem(
    parentItemId : int, 
    childSelectionInfo : IVsDataViewSelectionInfo, 
    newItemId : int, 
    identifier : Object[]
) : boolean

參數

  • parentItemId
    類型:Int32

    新節點的父代的完整名稱。

  • newItemId
    類型:Int32

    新節點的數值識別項可以插入。

  • identifier
    類型:array<Object[]

    包含表示新結構的識別組件的陣列。

傳回值

類型:Boolean
true ,如果插入節點;否則, false。

例外狀況

例外狀況 條件
ArgumentNullException

childSelectionInfo 參數為 nullnull 參考 (即 Visual Basic 中的 Nothing)。

ArgumentException

childSelectionInfo 參數不是指定的父代節點的子系。

.NET Framework 安全性

請參閱

參考

IVsDataViewHierarchy 介面

InsertItem 多載

Microsoft.VisualStudio.Data.Services.SupportEntities 命名空間