DirectoryInfoNaturalComparerCompare Method

Compares the directory names of two DirectoryInfo using Natural sort.

https://en.wikipedia.org/wiki/Natural_sort_order

Definition

Namespace: DevCase.Runtime.TypeComparers
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public int Compare(
	DirectoryInfo first,
	DirectoryInfo second
)

Parameters

first  DirectoryInfo
The first DirectoryInfo to compare.
second  DirectoryInfo
The second DirectoryInfo to compare.

Return Value

Int32
- Returns zero if the directory names are identical.

(This value can be casted as: Equals)

- Returns 1 if the directory name pointed to by 'first' has a greater value than that pointed to by 'second'.

(This value can be casted as: GreaterThan)

- Returns -1 if the directory name pointed to by 'first' has a lesser value than that pointed to by 'second'.

(This value can be casted as: LessThan)

Implements

IComparerTCompare(T, T)

See Also