IVsDataViewHierarchy.InsertItem 方法 (Int32, String, Int32, array<Object )

插入指定的父节点下的指定节点。

命名空间:  Microsoft.VisualStudio.Data.Services.SupportEntities
程序集:  Microsoft.VisualStudio.Data.Services(在 Microsoft.VisualStudio.Data.Services.dll 中)

语法

声明
Function InsertItem ( _
    parentItemId As Integer, _
    typeName As String, _
    newItemId As Integer, _
    identifier As Object() _
) As Boolean
bool InsertItem(
    int parentItemId,
    string typeName,
    int newItemId,
    Object[] identifier
)
bool InsertItem(
    int parentItemId, 
    String^ typeName, 
    int newItemId, 
    array<Object^>^ identifier
)
abstract InsertItem : 
        parentItemId:int * 
        typeName:string * 
        newItemId:int * 
        identifier:Object[] -> bool 
function InsertItem(
    parentItemId : int, 
    typeName : String, 
    newItemId : int, 
    identifier : Object[]
) : boolean

参数

  • parentItemId
    类型:System.Int32
    新的节点的父节点的全名。
  • newItemId
    类型:System.Int32
    新的节点一个数字标识符插入。
  • identifier
    类型:array<System.Object[]
    包含表示新节点的标识符部件的数组。

返回值

类型:System.Boolean
true ,如果插入了节点;否则,false。

异常

异常 条件
ArgumentNullException

typeName 参数为 nullnull 引用(在 Visual Basic 中为 Nothing)。

.NET Framework 安全性

请参见

参考

IVsDataViewHierarchy 接口

InsertItem 重载

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