fr3dr1k on November 2nd, 2009

I have come across two ways querying XElements or XAttributes: Make an object IEnumerable and loop through the results Use the Single() method to return a single object only Typically you may have a situation where you write some Linq-to-XML like this: IEnumerable attrib = from att in elemInner.Attributes() where (string)att.Name.ToString() == “sectionName” select att; [...]

  • Share/Bookmark

Continue reading about Getting a single XAttribute or XElement

Get Adobe Flash playerPlugin by wpburn.com wordpress themes