using System;
using System.Collections.Generic;
using System.Linq; //导入LINQ
namespace 扩展方法
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(SS());
}
static public bool SS()
{
List<int> Students = new List<int>() { 1,2,3,4,5};
bool result = Students.All(i=>i >10); //列表内的所有数字都大于10吗?
return result;
}
}
}
最后修改:2022 年 12 月 05 日
© 允许规范转载