title: Two lists with same elements are not equal. Why?
body: <p>I have the following:</p>
  
  <pre><code>  var a = new List&lt;OrderRule&gt; {
      new OrderRule("name", OrderDirection.Ascending),
      new OrderRule("age", OrderDirection.Descending)
    };
  
  
    var b = new List&lt;OrderRule&gt; {
      new OrderRule("name", OrderDirection.Ascending),
      new OrderRule("age", OrderDirection.Descending)
    };
  
    var r = a.Equals(b);
  </code></pre>
  
  <p>The r variable is false even if the two lists include items which are equal to each other. The OrdeRule class implements IEquality. Note that two OrderRules are equal when both Direction and Property are equal.</p>
  
  <pre><code>public enum OrderDirection { ASC, DESC }
  
  public class OrderRule : IEquatable&lt;OrderRule&gt; {
  
    public OrderDirection Direction { get; }
    public String Property { get; }
  
    public OrderRule(String property, OrderDirection direction) {
      Direction = direction;
      Property = property;
    }
  
    public Boolean Equals(OrderRule other) {
  
      if (other == null)
        return false;
  
      return Property.Equals(other.Property) &amp;&amp; Direction.Equals(other.Direction);
  
    }
  
    public override Boolean Equals(Object obj) {
  
      if (ReferenceEquals(null, obj))
        return false;
  
      if (ReferenceEquals(this, obj))
        return true;
  
      if (obj.GetType() != GetType())
        return false;
  
      return Equals(obj as IncludeRule);
  
    }
  
    public override Int32 GetHashCode() {
  
      return HashCode.Of(Property).And(Direction);
  
    }
  
  }
  </code></pre>
  
  <p>What am I missing?</p>