Show / Hide Table of Contents

Method Compare

| Improve this Doc View Source

Compare(DataRow, DataRow, SortDirection, IComparer<T>)

Compares value for two DataRow for specified sorting direction and comparer.

Declaration
public int Compare(DataRow x, DataRow y, SortDirection direction = SortDirection.Ascending, IComparer<T> comparer = null)
Parameters
Type Name Description
DataRow x

The DataRow to be compared.

DataRow y

The other DataRow to compare.

SortDirection direction

The specified sorting direction.

System.Collections.Generic.IComparer<T> comparer

The custom comparer. If null, default comparer will be used.

Returns
Type Description
System.Int32

0 if two values are equal, 1 if first value is greater than second, otherwise -1.

| Improve this Doc View Source

Compare(DataRow, DataRow, SortDirection)

Declaration
public override sealed int Compare(DataRow x, DataRow y, SortDirection direction)
Parameters
Type Name Description
DataRow x
DataRow y
SortDirection direction
Returns
Type Description
System.Int32
Overrides
Column.Compare(DataRow, DataRow, SortDirection)
  • Improve this Doc
  • View Source
Back to top Copyright © Weifen Luo | DevZest