FileInfoNaturalComparerCompare Method

Compares the file names of two FileInfo 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(
	FileInfo first,
	FileInfo second
)

Parameters

first  FileInfo
The first FileInfo to compare.
second  FileInfo
The second FileInfo to compare.

Return Value

Int32
- Returns zero if the file names are identical.

(This value can be casted as: Equals)

- Returns 1 if the file 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 file 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