title: LINQ order outer list by property of inner list
body: <p>I would like to sort a collection of <code>Method</code> objects based on the <code>OtherName</code> property of the first element of each object's <code>Method2</code> collection.</p>
  
  <pre><code>public class Method
  {
      public IEnumerable&lt;Method2&gt; Method2{ get; set; }
  }
  
  public class Method2
  {
      public string OtherName {get;set;}
  }
  </code></pre>
  
  <p>Code</p>
  
  <pre><code>// generate test data
  var rnd = new Random();
  var collection = Enumerable.Range(0, 5).Select(x =&gt; {
     var m = new Method();
     m.Method2 = new Method2[] { new Method2 { OtherName = rnd.Next(10).ToString() } };
     return m;
  });
  
  // sort outer list by OtherName property of first element in inner list
  // ??????
  </code></pre>