Show / Hide Table of Contents

Class NaturalSortComparer<T>

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

Inheritance
System.Object
NaturalSortComparer<T>
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
System.String x

The first object to compare.

System.String y

The second object to compare.

Returns
Type Description
System.Int32

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.

Extension Methods

Extensions.Yield<T>(T)
Back to top Copyright © 2009-2018 Colectica