Is there a better way to product the Linq To XML?

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
The current code snippet below works but is there a more efficient way of doing the same thing ..


<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; var fields =
<span style="color:Blue; from match <span style="color:Blue; in _config.Descendants(<span style="color:#A31515; "Session").Where(c => c.Element(<span style="color:#A31515; "SessionName").Value == sessionName).Elements(<span style="color:#A31515; "DataType").Elements(<span style="color:#A31515; "FieldMap")
<span style="color:Blue; select <span style="color:Blue; new
{
title = match.Element(<span style="color:#A31515; "FieldName").Value
};
[/code]
<br/>
Thanks in advance


View the full article
 
Back
Top