共用方式為


IVsHierarchyItemManager.GetHierarchyItem Method

Gets or creates an IVsHierarchyItem corresponding to the specified hierarchy and item identifier.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.Immutable.11.0 (in Microsoft.VisualStudio.Shell.Immutable.11.0.dll)

Syntax

'宣告
Function GetHierarchyItem ( _
    hierarchy As IVsHierarchy, _
    itemid As UInteger _
) As IVsHierarchyItem
IVsHierarchyItem GetHierarchyItem(
    IVsHierarchy hierarchy,
    uint itemid
)

Parameters

Return Value

Type: Microsoft.VisualStudio.Shell.IVsHierarchyItem
The hierarchy item.

Remarks

If the item has already been requested, the same instance is returned, otherwise a new IVsHierarchyItem instance is created.

.NET Framework Security

See Also

Reference

IVsHierarchyItemManager Interface

Microsoft.VisualStudio.Shell Namespace