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

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -