集合类特有的遍历方式
var numbers = new List<int> { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; int[] num={ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; numbers.ForEach( number => Console.Write(number + " ")); Array.ForEach(num,(nu => Console.Write(nu + " ")));
2022-05-24 06:29:53
集合类特有的遍历方式
var numbers = new List<int> { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; int[] num={ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; numbers.ForEach( number => Console.Write(number + " ")); Array.ForEach(num,(nu => Console.Write(nu + " ")));