UIHierarchy.GetItem Method (String)


Gets the item designated by given path.

Namespace:   EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

UIHierarchyItem GetItem(
	string Names


Type: System.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.

Return Value

Type: EnvDTE.UIHierarchyItem

A UIHierarchyItem object.

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.

Return to top