ProjectNode.CompareNodes Method

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

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

See Also

Reference

ProjectNode Class

ProjectNode Members

Microsoft.VisualStudio.Package Namespace