摘要: 今天看了一天的LINQ,给自己布置一个问题:用LINQ遍历一个指定目录并输出为XML 写出的代码如下: public static XElement ToXml(this DirectoryInfo dir) { XElement root = new XElement("Dir", new XAttribute("Name", dir.Name), from subDir in di... 阅读全文
posted @ 2008-10-20 21:15 alexcn 阅读(2631) 评论(4) 推荐(0) 编辑