concatenate string, with different first and last iteration
You should use String.Join() here. Its easier to read and shorter as well.
Like
string[] arr = { &quot;A1&quot;, &quot;A2&quot;, &quot;B3&quot;, &quot;D4&quot;, &quot;WHATEVER STRING&quot; }; // can be any string value
string result = &quot;=&quot; + string.Join(&quot;-&quot;, arr) + &quot;=&quot;;