Мы используем куки, чтобы пользоваться сайтом было удобно.
Хорошо
to the top
>
>
>
Примеры ошибок, обнаруженных с...

Примеры ошибок, обнаруженных с помощью диагностики V3126

V3126. Type implementing IEquatable<T> interface does not override 'GetHashCode' method.


NBitcoin

V3126 Type 'MoneyBag' implementing IEquatable<T> interface does not override 'GetHashCode' method. Money.cs 78


public class MoneyBag : IMoney,
                        IEnumerable<IMoney>,
                        IEquatable<MoneyBag>
{
  ....
  public bool Equals(MoneyBag other)
  {
    return Equals(other as IMoney);
  }

  public bool Equals(IMoney other)
  {
    if (other is null)
      return false;
    var m = new MoneyBag(other);
    return m._bag.SequenceEqual(_bag);
  }
  ....
}