Class
SortByIndexComparer<T>

Defines a method that compares two indexes.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.ScheduleView.dll

Type Parameters:

T

The type of objects to compare.This type parameter is contra-variant. That is, you can use either the type you specified or any type that is less derived.

Syntax:

cs-api-definition
public class SortByIndexComparer<T> : IComparer<T>

Inheritance: objectSortByIndexComparer<T>

Implements: IComparer<T>

Constructors

SortByIndexComparer(IList<T>)

Initializes a new instance of the SortByIndexComparer class.

Declaration

cs-api-definition
public SortByIndexComparer(IList<T> source)

Parameters

source

IList<T>

The list to be sorted.

Methods

Compare(T, T)

Compares two parameters by their indices in the source list returns an integer that indicates whether the value of this instance is greater than, less than, or equal to the value of the specified 32-bit signed integer.

Declaration

cs-api-definition
public int Compare(T app1, T app2)

Parameters

app1

T

app2

T

Returns

int

A signed number indicating the relative values of the indices of app1 and app2. Less than zero - index of app1 is less than index of app2. Zero index of app1 is equal to index of app2. Greater than zero index of app1 is greater than index of app2.

Implements IComparer<T>.Compare(T, T)