title: ASP.NET - Enumerate through SiteMapNode.ChildNodes
body: <p>I am reading in from my web.sitemap file, and I would like to apply a Linq OrderBy command to the ChildNode elements.  However, I can't seem to access the OrderBy method to the ChildNodes property unless I first cast it to SiteMapNode (which is dumb because it's already of type SiteMapNode).  Please point me in the right direction.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>foreach (SiteMapNode childNode in node.ChildNodes.Cast&lt;SiteMapNode&gt;().OrderBy(x =&gt; x["name"]))
  </code></pre>