LINQ in Action roller

Linq to XML query condition

Hello, I am new to Linq. I have this xml file that I want to query: NO NO NO NO YES YES Yes Yes Yes Yes Yes Yes NO NO NO NO YES YES Yes Yes Yes Yes YES YES And here is my linq code: string aPath = AppDomain.CurrentDomain.BaseDirectory; aPath = aPath + "\\AppConfig.xml"; XDocument configFile = XDocument.Load(aPath); var setup = from UserElement in configFile.Descendants("USER") where UserElement.Attributes().Count()>0 && UserElement.Attribute("CODE") != null && UserElement.Attribute("CODE").Value.Equals("2") Read More...
Published Thursday, October 30, 2008 11:22 PM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog

Sponsoring

Syndication