static void Main(string[] args)
{
List<string> list = new List<string>() { "aaa", "bbb", "ccc", "ddd", "eee", "fff" };
foreach (var tmp in list.FindAll(s => s.Contains('a')))
{
Console.WriteLine(tmp);
}
//单参数
del yoyodel = y => y * y;
int k = yoyodel(5);
Console.WriteLine(k);
//多参数
del1 yoyozhu = (m, n) => m * n;
int k1 = yoyozhu(4, 5);
Console.WriteLine(k1);
int k2=0;
//无参数代码块
Func<int> yoyoshao = () => { k2 = 10 * 10; return k2; };
Console.WriteLine(k2);
Thread.Sleep(1000);
Console.WriteLine(k2);
Console.ReadKey();
}
//单参数委托
delegate int del(int k);
//多参数委托
delegate int del1(int m,int n);