title: How to check whether List<T>.Sort actually sorted something?
body: <p>Consider the following code:</p>
  
  <pre><code>class Employee : IComparable&lt;Employee&gt;
  {
      public string Name { get; set; }
  
      public int CompareTo(Employee other)
      {
          return string.Compare(this.Name, other.Name);
      }
  }
  
  void DoStuff()
  {
      var e1 = new Employee() { Name = "Frank" };
      var e2 = new Employee() { Name = "Rizzo" };
  
      var lst = new List&lt;Employee&gt;() { e1, e2 };
      lst.Sort();
  }
  </code></pre>
  
  <p>How do I know if the Sort method actually rearranged anything?  Bonus question: if it rearrange, how many things?</p>