How about this method?
`'A'.ToString() + 'B'.ToString()` Simply use `ToString` method and then add the strings.
– jitendragargJul 02 '17 at 09:50
3
While jitendragarg's method works, it creates more garbage than is necessary. Two garbage strings for a single resulting string. Fruchtzwerg's method creates a single garbage object for the resulting string.
– Eric VasilikFeb 20 '20 at 02:48
1 Answers1
25
char[] chars = {'a', 'b'};
string s = new string(chars);