Show / Hide Table of Contents

Class NaturalSortComparer<T>

Sort string naturally. For example, numbers won't be sorted "1 10 2 20 3...".

Inheritance
object
NaturalSortComparer<T>
Implements
IComparer<string>
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Algenta.Colectica.Model.Utility
Assembly: Algenta.Colectica.Model.dll
Syntax
public class NaturalSortComparer<T> : IComparer<string>
Type Parameters
Name Description
T

Methods

Compare(string, string)

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

Declaration
public int Compare(string x, string y)
Parameters
Type Name Description
string x

The first object to compare.

string y

The second object to compare.

Returns
Type Description
int

A signed integer that indicates the relative values of x and y, as shown in the following table.Value Meaning Less than zerox is less than y.Zerox equals y.Greater than zerox is greater than y.

Exceptions
Type Condition
NotImplementedException

Implements

IComparer<T>

Extension Methods

Extensions.Yield<T>(T)
In this article
Back to top Generated by DocFX