I don't often use Linq to query XML, and I don't have a great deal of experience with XML. What I would like to do is to query this simple XML document...
<AlarmParameters>
<Parameter>
<ParameterName>ConsecutivePoints</ParameterName>
<Points>30</Points>
<AllowEdit>true</AllowEdit>
<Caption>Consecutive Points</Caption>
</Parameter>
<Parameter>
<ParameterName>SigmaCount</ParameterName>
<Count>1</Count>
<AllowEdit>true</AllowEdit>
<Caption>Number of Sigmas</Caption>
</Parameter>
</AlarmParameters>
... And produce a list of 'Parameter' classes, each containing the properties shown in the XML sample. Using LinqPad, I've managed to get this far, but don't really know how to complete this.
string xmlFragment = "<AlarmParameters><Parameter><ParameterName>ConsecutivePoints</ParameterName><Points>30</Points><AllowEdit>true</AllowEdit><Caption>Consecutive Points</Caption></Parameter><Parameter><ParameterName>SigmaCount</ParameterName><Count>1</Count><AllowEdit>true</AllowEdit><Caption>Number of Sigmas</Caption></Parameter></AlarmParameters>";
StringReader strReader = new StringReader(xmlFragment);
XDocument xmlDoc = XDocument.Load(strReader);
var result = from parameter in xmlDoc (not sure what Linq to put here next)