I have this word and I would like to split it into arrays with taking the last previous character in every iteration of split .
string word = "HelloWorld!";
string[] mystringarray = word.Select(x => new string(x, 2)).ToArray();
Console.WriteLine(mystringarray);
Output result :
[HH,ee,ll,oo,WW,oo,rr,ll,dd,!!]
Expected result :
[He,el,ll,lo,ow,wo,or,rl,ld]
How can I achieve that?