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…


This content originally appeared on Posts on LINQ to Fail and was authored by Posts on LINQ to Fail

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.


This content originally appeared on Posts on LINQ to Fail and was authored by Posts on LINQ to Fail


Print Share Comment Cite Upload Translate Updates
APA

Posts on LINQ to Fail | Sciencx (2010-04-25T00:00:00+00:00) Why does this code work?. Retrieved from https://www.scien.cx/2010/04/25/why-does-this-code-work/

MLA
" » Why does this code work?." Posts on LINQ to Fail | Sciencx - Sunday April 25, 2010, https://www.scien.cx/2010/04/25/why-does-this-code-work/
HARVARD
Posts on LINQ to Fail | Sciencx Sunday April 25, 2010 » Why does this code work?., viewed ,<https://www.scien.cx/2010/04/25/why-does-this-code-work/>
VANCOUVER
Posts on LINQ to Fail | Sciencx - » Why does this code work?. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2010/04/25/why-does-this-code-work/
CHICAGO
" » Why does this code work?." Posts on LINQ to Fail | Sciencx - Accessed . https://www.scien.cx/2010/04/25/why-does-this-code-work/
IEEE
" » Why does this code work?." Posts on LINQ to Fail | Sciencx [Online]. Available: https://www.scien.cx/2010/04/25/why-does-this-code-work/. [Accessed: ]
rf:citation
» Why does this code work? | Posts on LINQ to Fail | Sciencx | https://www.scien.cx/2010/04/25/why-does-this-code-work/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.