Table of Contents

Class Compare

Namespace
Dassie.Extensions
Assembly
Dassie.Core.dll

Provides implementations of the three-way comparison operator, <=>.

public static class Compare
Inheritance
Compare
Inherited Members

Methods

op_LessEqualGreater(byte, byte)

Implements a three-way comparison.

public static int op_LessEqualGreater(byte a, byte b)

Parameters

a byte

The first value to compare.

b byte

The second value to compare.

Returns

int

Returns 0 if a is equal to b; otherwise, returns -1 if a is less than b; otherwise, returns 1.

op_LessEqualGreater(decimal, decimal)

Implements a three-way comparison.

public static int op_LessEqualGreater(decimal a, decimal b)

Parameters

a decimal

The first value to compare.

b decimal

The second value to compare.

Returns

int

Returns 0 if a is equal to b; otherwise, returns -1 if a is less than b; otherwise, returns 1.

op_LessEqualGreater(double, double)

Implements a three-way comparison.

public static int op_LessEqualGreater(double a, double b)

Parameters

a double

The first value to compare.

b double

The second value to compare.

Returns

int

Returns 0 if a is equal to b; otherwise, returns -1 if a is less than b; otherwise, returns 1.

op_LessEqualGreater(Half, Half)

Implements a three-way comparison.

public static int op_LessEqualGreater(Half a, Half b)

Parameters

a Half

The first value to compare.

b Half

The second value to compare.

Returns

int

Returns 0 if a is equal to b; otherwise, returns -1 if a is less than b; otherwise, returns 1.

op_LessEqualGreater(Int128, Int128)

Implements a three-way comparison.

public static int op_LessEqualGreater(Int128 a, Int128 b)

Parameters

a Int128

The first value to compare.

b Int128

The second value to compare.

Returns

int

Returns 0 if a is equal to b; otherwise, returns -1 if a is less than b; otherwise, returns 1.

op_LessEqualGreater(short, short)

Implements a three-way comparison.

public static int op_LessEqualGreater(short a, short b)

Parameters

a short

The first value to compare.

b short

The second value to compare.

Returns

int

Returns 0 if a is equal to b; otherwise, returns -1 if a is less than b; otherwise, returns 1.

op_LessEqualGreater(int, int)

Implements a three-way comparison.

public static int op_LessEqualGreater(int a, int b)

Parameters

a int

The first value to compare.

b int

The second value to compare.

Returns

int

Returns 0 if a is equal to b; otherwise, returns -1 if a is less than b; otherwise, returns 1.

op_LessEqualGreater(long, long)

Implements a three-way comparison.

public static int op_LessEqualGreater(long a, long b)

Parameters

a long

The first value to compare.

b long

The second value to compare.

Returns

int

Returns 0 if a is equal to b; otherwise, returns -1 if a is less than b; otherwise, returns 1.

op_LessEqualGreater(nint, nint)

Implements a three-way comparison.

public static int op_LessEqualGreater(nint a, nint b)

Parameters

a nint

The first value to compare.

b nint

The second value to compare.

Returns

int

Returns 0 if a is equal to b; otherwise, returns -1 if a is less than b; otherwise, returns 1.

op_LessEqualGreater(sbyte, sbyte)

Implements a three-way comparison.

public static int op_LessEqualGreater(sbyte a, sbyte b)

Parameters

a sbyte

The first value to compare.

b sbyte

The second value to compare.

Returns

int

Returns 0 if a is equal to b; otherwise, returns -1 if a is less than b; otherwise, returns 1.

op_LessEqualGreater(float, float)

Implements a three-way comparison.

public static int op_LessEqualGreater(float a, float b)

Parameters

a float

The first value to compare.

b float

The second value to compare.

Returns

int

Returns 0 if a is equal to b; otherwise, returns -1 if a is less than b; otherwise, returns 1.

op_LessEqualGreater(UInt128, UInt128)

Implements a three-way comparison.

public static int op_LessEqualGreater(UInt128 a, UInt128 b)

Parameters

a UInt128

The first value to compare.

b UInt128

The second value to compare.

Returns

int

Returns 0 if a is equal to b; otherwise, returns -1 if a is less than b; otherwise, returns 1.

op_LessEqualGreater(ushort, ushort)

Implements a three-way comparison.

public static int op_LessEqualGreater(ushort a, ushort b)

Parameters

a ushort

The first value to compare.

b ushort

The second value to compare.

Returns

int

Returns 0 if a is equal to b; otherwise, returns -1 if a is less than b; otherwise, returns 1.

op_LessEqualGreater(uint, uint)

Implements a three-way comparison.

public static int op_LessEqualGreater(uint a, uint b)

Parameters

a uint

The first value to compare.

b uint

The second value to compare.

Returns

int

Returns 0 if a is equal to b; otherwise, returns -1 if a is less than b; otherwise, returns 1.

op_LessEqualGreater(ulong, ulong)

Implements a three-way comparison.

public static int op_LessEqualGreater(ulong a, ulong b)

Parameters

a ulong

The first value to compare.

b ulong

The second value to compare.

Returns

int

Returns 0 if a is equal to b; otherwise, returns -1 if a is less than b; otherwise, returns 1.

op_LessEqualGreater(nuint, nuint)

Implements a three-way comparison.

public static int op_LessEqualGreater(nuint a, nuint b)

Parameters

a nuint

The first value to compare.

b nuint

The second value to compare.

Returns

int

Returns 0 if a is equal to b; otherwise, returns -1 if a is less than b; otherwise, returns 1.