C# Linq查询 XML Object

C# Linq查询 XML Object_第1张图片

Demo 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace LinqDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            var InputArray = new List();
            for(int i=1; i < 10; i++)
            {
                InputArray.Add(i);
            }

            Console.WriteLine("使用 Linq to Object 查询结果:");
            LinqToObjectQuery(InputArray);
        
            Console.WriteLine("使用 Linq to XML 查询结果:");
            LinqToXML();

            Console.Read();
        }
        /// 
        /// Linq Object 查询
        /// 
        /// 
   

你可能感兴趣的:(C#)