Adds a new item to the hierarchy.
Namespace: Microsoft.VisualStudio.Package
Assembly: MPF.Project.NonShipping (in MPF.Project.NonShipping.dll)
Syntax
'宣言
Protected Overridable Function AddItemToHierarchy ( _
addType As HierarchyAddType _
) As Integer
'使用
Dim addType As HierarchyAddType
Dim returnValue As Integer
returnValue = Me.AddItemToHierarchy(addType)
protected virtual int AddItemToHierarchy(
HierarchyAddType addType
)
protected:
virtual int AddItemToHierarchy(
HierarchyAddType addType
)
protected function AddItemToHierarchy(
addType : HierarchyAddType
) : int
Parameters
addType
Type: Microsoft.VisualStudio.Package.HierarchyAddTypeThe HierarchyAddType, which determines whether the item to be added is new or existing.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK.
Remarks
This method handles the commands that add new and existing items by invoking the Visual Studio dialog box, which calls back to the project's method.
Permissions
- 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.