Hi,
There are two steps for converting ASCII into string
[1]
int byteCount=System.Text.ASCIIEncoding.ASCII.GetByteCount(urASCIIString);
Byte[] ASCIIByteArray = new Byte[byteCount];
byte[] ASCIIByteArray = System.Text.ASCIIEncoding.ASCII.GetBytes(urASCIIString);
[2] If you want back string
string constructedStringfromascii = System.Text.ASCIIEncoding.GetChars(ASCIIByteArray );
[3] However if you want back characters
char[] chararray;
chararray = constructedStringfromascii .ToCharArray();
Console.Write("Decoded chars: ");
foreach (Char c in chararray ) {
Console.Write("[{0}]", c);
}
Hope this helps.
Thanks and Regards,
Manish Bafna.
MCP and MCTS