SHARE
TWEET

Untitled

a guest Jul 18th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. string[] value1 = {"A","B"};
  2. string[] value2 = {"C","D"};
  3.      
  4. List<string> value1 = new List<string>() {"A","B"};
  5. List<string> value2 = new List<string>() {"C","D"};
  6.  
  7. var output = {"AC","BD"};
  8.      
  9. var output = {"AC","BD"};
  10.      
  11. var output = value1
  12.   .Zip(value2, (v1, v2) => v1 + v2)
  13.   .ToArray();
  14.      
  15. var output = Enumerable
  16.   .Range(0, Math.Max(value1.Length, value2.Length))
  17.   .Select(i => (i < value1.Length ? value1[i] : "") +
  18.                (i < value2.Length ? value2[i] : ""))
  19.   .ToArray();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top