假如有個fccom.xml文件!用循環(huán)把LIST讀取出來。ArrayList l = new ArrayList();XDocument doc = XDocument.Load("fccom.xml"); var list = (from node in doc.Root.Descendants("FcCom") //where node.Attribute("id").Value == id select new { scompany=node.Attribute("scompany").Value, id=node.Attribute("id").Value }).Take(12); foreach (var attr in list) { l.add(attr.toString()); }請問在這循環(huán)中我應該用什么來存放attr好呢!像我用ArrayList 來存放,可返回的值卻是System.Collections.ArrayList這種類型的。
- 2 回答
- 0 關(guān)注
- 455 瀏覽
添加回答
舉報
0/150
提交
取消