- 博客(0)
- 资源 (6)
- 收藏
- 关注
linq 英文帮助文档
linq 英文帮助文档
XElement xmlCustomers = new XElement("customers",
from c in customers
where c.Country == Countries.Italy
select new XElement("customer",
new XElement("name", c.Name),
new XElement("city", c.City),
new XElement("country", c.Country)));
var cities = xmlCustomers.DescendantsAndSelf("city");
Console.WriteLine("\nBefore XML source modification");
foreach (var city in cities) {
Console.WriteLine(city);
}
The result of the query is the following:
Before XML source modification
<city>Brescia</city>
<city>Torino</city>
2010-08-26
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人