title: C# How to use OrderBy with a property on a nested class?
body: <p>I have a IEnumerable collection of a class which I want to sort.
  One of the properties I want to sort is in a nested class.
  What is the syntax to make this work?
  The code below shows what I am trying to do, although it does not work.</p>
  
  <pre><code>    AbsenceViewModel avm = new AbsenceViewModel();
      if (sort.Column != null)
      {
          if (sort.Column == "OtherLeaveName")
              avm.ListNames = avm.ListNames .OrderBy("NestedClass.Name", sort.Direction);
          else
              avm.ListNames = avm.ListNames (sort.Column, sort.Direction);
      }
  </code></pre>
  
  <p>So putting in "NestedClass.Name" doesn't work. What do I need to do instead?</p>