Saturday, January 8, 2011

How to convert String to Char[] and Char[] to String?

First, we see how to convert string to character Array

string str = "Hello World!";
char[] ch = str.ToCharArray();




now, we see how to convert character array to string:

string strtarget = new string(ch);

No comments:

Post a Comment