"Rick" <el*******@hotmail.com> wrote in message
news:Oq*************@TK2MSFTNGP12.phx.gbl...
Hi guys, i've seen it in VC++
but in C# how do i conver string to char[20]??
in c++ is like http://support.microsoft.com/?kbid=311259
Regards
I'm sure there are more elegant ways, but you can simply subscript your
String object to convert character by character:
char[] myString = new char[20];
String myStuff = "My stuff";
for (int i = 0; i < myStuff.Length; i++)
{
myString[i] = myStuff[i];
}
Console.WriteLine(myString);
--
Peter [MVP Visual Developer]
Jack of all trades, master of none.