12 lines
322 B
C#
12 lines
322 B
C#
namespace Mlaumcherb.Client.Avalonia.холопы;
|
||
|
||
// compares Y with X instead of X with Y
|
||
public class ReverseComparer<T> : IComparer<T> where T : IComparable<T>
|
||
{
|
||
public int Compare(T? x, T? y)
|
||
{
|
||
if (y is null)
|
||
return x is null ? 0 : -1;
|
||
return y.CompareTo(x);
|
||
}
|
||
} |