RosettaCodeData/Task/Loop-over-multiple-arrays-simultaneously/C-sharp/loop-over-multiple-arrays-simultaneously-2.cs

5 lines
157 B
C#
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
int[] numbers = { 1, 2, 3, 4 };
string[] words = { "one", "two", "three" };
Console.WriteLine(numbers.Zip(words, (first, second) => first + " " +
second));