Can someone help with an explanation of what does this mean:
... .Select(Func<XElement, XElement>selector)
Please an example of what should go in as parameter will be appreciated.
Also found it a little bit difficult naming this question. Suggestion will also be appreciated.
It’s a function taking XElement as argument and returning an XElement, so for instance:
I’m not interely sure if you have to assign it to a variable first, you could probably just do this:
give it a try (and let me know if it works 🙂 )
oh and for more information, here’s the msdn article, it also explains how to use delegates:
and how to use lambdas, for instance:
or, in this instance, use the lambda directly:
edited it following Pavel’s comment