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

By Super Man

how we can convert string to character array and character array 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);

How to convert String to Char[] and Char[] to String?  (1043 Views)