In this case you don't want to use string.Concat()
, you want to use string.Join()
. This accepts a separator and an array of strings to join by that separator. For example:
var joined = string.Join("#", theArray);
This would place the string value in joined
:
"cat#dog#perls"
(assuming, of course, that theArray
contains those values)