Why does this code work?

In the discussion on the Umbraco forum about using LINQ to Umbraco I posted a short code snippet of something we write fairly frequently at TheFARM using our version of LINQ with Umbraco.
I thought I’d post the challenge to my trusty followers, f…

In the discussion on the Umbraco forum about using LINQ to Umbraco I posted a short code snippet of something we write fairly frequently at TheFARM using our version of LINQ with Umbraco. I thought I’d post the challenge to my trusty followers, for them to see if they know why the code works. First off the code: IEnumerable<XElement> nodes = UmbXmlLinqExtensions.GetNodeByXpath(...); IEnumerable<IUmbracoPage> pages = nodes.Select(n =>(IUmbracoPage)(UmbracoPage)n); What the XPath being evaluated isn’t important, what is important is you’ll notice that we have a collection of System.
Print Share Comment Cite Upload Translate
CITATION GOES HERE CITATION GOES HERE
Select a language: