Why is:
(CheckBox)lstControls.Where(x => x.ID == "some_id").SingleOrDefault();
not as efficient as:
(CheckBox)lstControls.SingleOrDefault(x => x.ID == "some_id");
And for a not-so-well-formed XML document and you only know the name of the element you are looking for is this the best statement you can use to find the element:
var xmlElem = (from n in xDocument.Descendants() where (string)n.Attribute("name") == "some_node_name" select n).SingleOrDefault();
Thanks....