linq to xml 给读取后的结果排序

_小黑_ 2015-09-24 11:18:15

XElement xe = XElement.Load(xmlPath);
IEnumerable<XElement> elements = from fac in xe.Descendants(Node) select fac;

从xml 中读取的结果集,按照xml中的一个属性降序排序
使用linq 怎么写
...全文
72 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
_小黑_ 2015-09-24
  • 打赏
  • 举报
回复
引用 3 楼 duanzi_peng 的回复:
[quote=引用 1 楼 l397870376 的回复:] 已经解决 来节分
[/quote]
引用 2 楼 starfd 的回复:
XElement xe = XElement.Load(xmlPath); IEnumerable<XElement> elements = from fac in xe.Descendants(Node) order by fac.Attribure("demo").Value select fac;
其实我就是散粉的
exception92 2015-09-24
  • 打赏
  • 举报
回复
引用 1 楼 l397870376 的回复:
已经解决 来节分
  • 打赏
  • 举报
回复
XElement xe = XElement.Load(xmlPath); IEnumerable<XElement> elements = from fac in xe.Descendants(Node) order by fac.Attribure("demo").Value select fac;
_小黑_ 2015-09-24
  • 打赏
  • 举报
回复
已经解决 来节分

110,536

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧