Convert Array to String
By rizwanqau
@rizwanqau (8)
Pakistan
February 22, 2007 4:30am CST
Please tell me if you people know that can we convert character array to string like this...
char[] ChArray = new char[n]
string s;
s = ChArray[];
is it possible..
Regards
2 responses
@waseembashir (225)
• India
3 Jun 07
hey! the .ToString wont help you.
This is what you need to do:
static void Main(string[] args)
{
char[] word = new word[]{'H','i'};
//The constructor for string accepts a char //array pointer.
string str = new string (word);
Console.WriteLine(str);
Console.Read();
}