class UglyButCompactCode
{
static void Main()
{
List<int> x = new List<int>();
x.Add(5);
x.Add(10);
x.Add(15);
x.Add(20);
x.Add(25); //执行了5次add
x.ForEach(delegate(int n){Console.WriteLine(Math.Sqrt(n));}); //执行5次 求根 这句花括号最好留空
}
}
输出、
2.23606797749979
3.16227766016838
3.87298334620742
4.47213595499958
5