#if true
var listItems = from x in results.Descendants(ns + "row")
where x.Attribute("ows_Title") != null
select new {name = x.Element("ows_Title").Value};
foreach (var item in listItems)
{
System.Diagnostics.Debug.Print(item.name);
}
#else
var listItems = from x in results.Descendants(ns + "row")
where x.Attribute("ows_Title") != null
select new { name = "test" };
foreach (var item in listItems)
{
System.Diagnostics.Debug.Print(item.name);
}
#endif
|