How to order a list according to a property in the object whose list is a property in the object whose list I want to order?
<p>The title is not very clear. I'll try to explain my problem with code:</p>

<p>I have two classes A and B:</p>

<pre><code>public class A
{
    public List&lt;B&gt; Bs { get; set; }
}

public class B
{
    public DateTime DT { get; set; }
}
</code></pre>

<p>and now I have a list of objects of type A and I want to order them, by the DateTime of their Bs. I thought I could do something like this:</p>

<pre><code>private void MyFunc(List&lt;A&gt; As)
{
    var orderedAs = As.OrderBy(a =&gt; a.Bs.Select(b =&gt; b.DT));
}
</code></pre>

<p>Please help me to solve this issue
Thanks</p>