static void Main(string[] args) { Order order1 = new Order("CC", 3, "iPhone"); Order order2 = new Order("PP", 1, "iPad"); Order order3 = new Order("EE", 9, "iPhone"); OrderService service = new OrderService(); service.AddOrder(order1); service.AddOrder(order2); service.AddOrder(order3); Console.WriteLine("Xml文件"); service.ExportList(); List <Order> list = new List <Order>(); list = service.ImportList(); Console.WriteLine("原先的订单"); service.DisplayOrderList(); Console.WriteLine("新的订单"); OrderService.DisplayList(list); Console.WriteLine("iPhone"); List <Order> list2 = new List <Order>(); list2 = service.SearchOrderLinqByGood("iPhone"); OrderService.DisplayList(list2); Console.WriteLine("Change Count of iPhone"); service.ChangeOrder(order1.ID, 30); service.DisplayOrderList(); Console.WriteLine("Change the Price of Order1 to 9999"); service.SearchOrderByID(order1.ID).Detail[service.SearchOrderByID(order1.ID).Good, "Price"] = 9999.ToString(); service.DisplayOrderList(); Console.ReadLine(); }