i have:
int[] numbers = { 1, 2, 3};
string[] words = { "one", "two", "three" };
and need the output to be
1=one
2=two
3=three
thanks
if they are the same size you can use
int[] numbers = { 1, 2, 3};
string[] words = { "one", "two", "three" };
var list = numbers.Zip (words, (n, w) => n + "=" + w);
but note if they differ in size the non match items will be ignored
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With