c# - concatinating int[] to same size string[] -


i have:

int[] numbers = { 1, 2, 3}; string[] words = { "one", "two", "three" }; 

and need output

1=one 2=two 3=three 

thanks

if same size can use

int[] numbers = { 1, 2, 3}; string[] words = { "one", "two", "three" };  var list = numbers.zip (words, (n, w) => n + "=" + w); 

but note if differ in size non match items ignored


Comments

Popular posts from this blog

Python __call__ special method practical example -

How can I edit my VIM config so that Vim treats ".ejs" files the same as it currently treats my html files? -