0

I have char [] like {'Q','W','E','a','b','c','A','B','C'}

i want to put this char [] start from index 3 {'1',2','3'}

the result need to be {'Q','W','E','1',2','3''A','B','C'} how can i do that please?

thanks

JONI6543
  • 57
  • 1
  • 4

1 Answers1

3

It could be done using Linq as follows.

string[] Op1 = {"a","f","h","x","k","w","7"};
string[] Op2 = {"1",2","3"};
int StartIndex = 3;
string[] Result = Op1.Take(StartIndex).Concat(Op2).ToArray();
Codor
  • 17,447
  • 9
  • 29
  • 56