char [] chArray = infile.ReadChars(10);
or
char[] chArray = new char[] {'t','e','s','t'};
and you want to convert it to a String, I always (incorrectly) try:
String str = chArray.ToString();
and it doesn't work (you get "System.Char[]").
You have to say something like this:
String str = new String(chArray);
No comments:
Post a Comment