Skip to content

Latest commit

 

History

History
14 lines (12 loc) · 367 Bytes

MA0096.md

File metadata and controls

14 lines (12 loc) · 367 Bytes

MA0096 - A class that implements IComparable<T> should also implement IEquatable<T>

class Test : IComparable<T> // non-compliant
{
    public bool Equals(Test other) => throw null;
}

class Test : IComparable<T>, IEquatable<T> // ok
{
    public override bool Equals(object other) => throw null;
    public bool Equals(Test other) => throw null;
}