Table of Contents

Class ComparableUtil.BaseTypeComparerType

Namespace
ReFuel.Collections
Assembly
ReFuel.Common.dll
public class ComparableUtil.BaseTypeComparerType : IComparer<byte>, IComparer<sbyte>, IComparer<short>, IComparer<ushort>, IComparer<int>, IComparer<uint>, IComparer<long>, IComparer<ulong>, IComparer<float>, IComparer<double>, IComparer<decimal>, IComparer<string>
Inheritance
ComparableUtil.BaseTypeComparerType
Implements
Inherited Members

Methods

Compare(byte, byte)

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

public int Compare(byte x, byte y)

Parameters

x byte

The first object to compare.

y byte

The second object to compare.

Returns

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.

Compare(decimal, decimal)

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

public int Compare(decimal x, decimal y)

Parameters

x decimal

The first object to compare.

y decimal

The second object to compare.

Returns

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.

Compare(double, double)

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

public int Compare(double x, double y)

Parameters

x double

The first object to compare.

y double

The second object to compare.

Returns

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.

Compare(short, short)

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

public int Compare(short x, short y)

Parameters

x short

The first object to compare.

y short

The second object to compare.

Returns

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.

Compare(int, int)

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

public int Compare(int x, int y)

Parameters

x int

The first object to compare.

y int

The second object to compare.

Returns

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.

Compare(long, long)

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

public int Compare(long x, long y)

Parameters

x long

The first object to compare.

y long

The second object to compare.

Returns

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.

Compare(sbyte, sbyte)

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

public int Compare(sbyte x, sbyte y)

Parameters

x sbyte

The first object to compare.

y sbyte

The second object to compare.

Returns

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.

Compare(float, float)

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

public int Compare(float x, float y)

Parameters

x float

The first object to compare.

y float

The second object to compare.

Returns

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.

Compare(string?, string?)

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

public int Compare(string? a, string? b)

Parameters

a string
b string

Returns

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.

Compare(ushort, ushort)

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

public int Compare(ushort x, ushort y)

Parameters

x ushort

The first object to compare.

y ushort

The second object to compare.

Returns

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.

Compare(uint, uint)

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

public int Compare(uint x, uint y)

Parameters

x uint

The first object to compare.

y uint

The second object to compare.

Returns

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.

Compare(ulong, ulong)

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

public int Compare(ulong x, ulong y)

Parameters

x ulong

The first object to compare.

y ulong

The second object to compare.

Returns

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.