Compares nodes for sorting purposes.
Namespace: Microsoft.VisualStudio.Package
Assembly: MPF.Project.NonShipping (in MPF.Project.NonShipping.dll)
Syntax
'宣言
Protected Friend Overridable Function CompareNodes ( _
node1 As HierarchyNode, _
node2 As HierarchyNode _
) As Integer
'使用
Dim node1 As HierarchyNode
Dim node2 As HierarchyNode
Dim returnValue As Integer
returnValue = Me.CompareNodes(node1, _
node2)
protected internal virtual int CompareNodes(
HierarchyNode node1,
HierarchyNode node2
)
protected public:
virtual int CompareNodes(
HierarchyNode^ node1,
HierarchyNode^ node2
)
protected internal function CompareNodes(
node1 : HierarchyNode,
node2 : HierarchyNode
) : int
Parameters
node1
Type: Microsoft.VisualStudio.Package.HierarchyNodeThe first node to compare.
node2
Type: Microsoft.VisualStudio.Package.HierarchyNodeThe second node to compare.
Return Value
Type: System.Int32
By default first compares the PackageDefaultSortOrderNode values and returns a positive integer if the first node's SortPriority is greater than that of the second node, a negative integer if it is less. If the nodes have the same SortPriority, then their captions are compared with [M:System.String.Compare(string strA, string strB, bool ignoreCase, T:System.Globalization.CultureInfo culture)].
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.