C# assign char and char array to string?
- by Bopha
char character = 'c';
string str = null;
str = character.ToString();//this is ok
char[] arrayChar = { 'a', 'b', 'c', 'd' };
string str2 = null;
str2 = string.Copy(arrayChar.ToString());//this is not ok
str2 = arrayChar.ToString();//this is not ok.
I'm trying to converting char array to string, but the last two attempts don't work. Other source I found and they have to create new string type, but I don't know why. Can someone give me little explaination, thanks.