标签:with csharp span .net attr new 函数 利用 select
IEnumerable<string> partNos = from item in purchaseOrder.Descendants("Item") select (string) item.Attribute("PartNumber");
IEnumerable<XElement> partNos = from item in purchaseOrder.Descendants("Item") where (int) item.Element("Quantity") * (decimal) item.Element("USPrice") > 100 orderby (string)item.Element("PartNumber") select item;
XElement contacts = new XElement("Contacts", new XElement("Contact", new XElement("Name", "Patrick Hines"), new XElement("Phone", "206-555-0144", new XAttribute("Type", "Home")), new XElement("phone", "425-555-0145", new XAttribute("Type", "Work")), new XElement("Address", new XElement("Street1", "123 Main St"), new XElement("City", "Mercer Island"), new XElement("State", "WA"), new XElement("Postal", "68042") ) ) );
标签:with csharp span .net attr new 函数 利用 select
原文地址:http://www.cnblogs.com/zero0r1/p/7417532.html