Thursday, September 25, 2014

char array to string array

Hi Alex,


Based on your code, you can't convert char array to string array. you can try to convert char array to string, As Michael said, there is a constructor on string to do it. The code you can use like this



char[] chars = {'a', ' ', 's', 't', 'r', 'i', 'n', 'g'};
string s = new string(chars);

Shows s=a string


Have a nice day!


Kristin




We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

Click HERE to participate the survey.


No comments:

Post a Comment