标签:add console stat integer ble int line read rgs
1 static double TakeSquareRoot(int x) 2 { 3 //return Math.Sqrt(x); 4 return x + 1; 5 } 6 7 static void Main(string[] args) 8 { 9 List<int> integers = new List<int>(); 10 integers.Add(1); 11 integers.Add(2); 12 integers.Add(3); 13 integers.Add(4); 14 15 Converter<int, double> converter = TakeSquareRoot; 16 List<double> doubles; 17 doubles = integers.ConvertAll<double>(converter); 18 foreach (double d in doubles) 19 { 20 Console.WriteLine(d); 21 } 22 23 Console.WriteLine("OK"); 24 25 Console.ReadKey(); 26 }
标签:add console stat integer ble int line read rgs
原文地址:https://www.cnblogs.com/xieweikang/p/11775775.html