title: Trying to OrderBy Date on list returned in C# (Umbraco 4.8.1)
body: <p>I'm trying to pull the latest 5 articles from the news section and then sort them by the article date.</p>
  
  <p>I've managed to get the 5 articles and display them ok, but the OrderBy is not working as expected. I need to sort them by a property on the node called "NewsDate" which is a date picker.</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
      {
          var currentNode = Node.GetCurrent();
          var nodeTypeAlias = currentNode.NodeTypeAlias;
  
          if (nodeTypeAlias == "NewsMasterPage")
          {
              var nodes = FindChildren(currentNode, t =&gt; t.NodeTypeAlias.Equals("NewsArticle"));
              var nodesOutput = nodes.OrderBy(n =&gt; n.GetProperty("NewsDate"));
  
              newsRepeater.DataSource = nodesOutput;
              newsRepeater.DataBind();
          }
  
      }
  
      private static List&lt;Node&gt; FindChildren(Node currentNode, Func&lt;Node, bool&gt; predicate)
      {
          List&lt;Node&gt; result = new List&lt;Node&gt;();
  
          var nodes = currentNode
              .Children
              .OfType&lt;Node&gt;()
              .Where(predicate).Take(4);
          if (nodes.Count() != 0)
              result.AddRange(nodes);
  
          foreach (var child in currentNode.Children.OfType&lt;Node&gt;())
          {
              nodes = FindChildren(child, predicate);
              if (nodes.Count() != 0)
                  result.AddRange(nodes);
          }
          return result;
      }
  </code></pre>