Ram Prasad

Ram Prasad

  • NA
  • 326
  • 18.4k

Combining array elements

Jun 30 2020 7:17 AM
I want to combine 2 consecutive elements of the even str array to create another string array with output as shown in example
 
For example if we have 6 elements in an array like
  1. string[] str = new string[] {"a""b""c""d""e""1"}   
it will combine in another string array strCombined to show output of {"ab", "cd", "e1"}
 
Please advise on how this can be done?

Answers (5)