Guess I have just never run across it before.
What is the proper way to turn a char[] into a string?
The ToString() method from an array of chars doesn't do the trick. Guess I had always imagined that was what it was for.
Guess I have just never run across it before.
What is the proper way to turn a char[] into a string?
The ToString() method from an array of chars doesn't do the trick. Guess I had always imagined that was what it was for.
char[] chars = {'a', ' ', 's', 't', 'r', 'i', 'n', 'g'};
string s = new string(chars);
Use the constructor of string which accepts a char[]
char[] c = ...;
string s = new string(c);