static void Main(string[] args) { // Create the data source by using a collection initializer. var students = new[] { new {First="Svetlana", Last="Omelchenko", ID=111, Scores = new List<int…
1.LINQ to XML类 以下的代码演示了如何使用LINQ to XML来快速创建一个xml: 隐藏行号 复制代码 ?创建 XML public static void CreateDocument() { string path = @"d:\website"; XDocument xdoc = new XDocument(new XDeclaration("1.0", "utf-8", "yes"), new XEle…