次の方法で共有


UIHierarchy.GetItem(String) Method

Definition

Gets the item designated by given path.

public:
 EnvDTE::UIHierarchyItem ^ GetItem(System::String ^ Names);
public:
 EnvDTE::UIHierarchyItem ^ GetItem(Platform::String ^ Names);
EnvDTE::UIHierarchyItem GetItem(std::wstring const & Names);
[System.Runtime.InteropServices.DispId(5)]
public EnvDTE.UIHierarchyItem GetItem (string Names);
[<System.Runtime.InteropServices.DispId(5)>]
abstract member GetItem : string -> EnvDTE.UIHierarchyItem
Public Function GetItem (Names As String) As UIHierarchyItem

Parameters

Names
String

Required. The names in order from the root leading to subsequent subnodes. The last name in the array is the node returned as a UIHierarchyItem object.

Returns

A UIHierarchyItem object.

Attributes

Remarks

Note that this method may fail with an E_INVALIDARG, if the item being retrieved is located in a project hierarchy or folder that has not first been expanded in the Solution Explorer.

The path consists of node names separated by backslashes (\). If two backslashes are adjacent to one another, they are parsed as a single backslash character that is part of a node name and not a separator.

For details on another way to access nodes in a UIHierarchy, see the documentation for UIHierarchy.

Applies to