I am giving the input to console program as "Hai My Name is KrishNA" and that string is converted in to ascii characters and I'm getting output as 543777096. I want If I give the same number as input I want the same output as above in the same program and for space the ascii value is 32 i want to skip that space.I wrote the c# program Below
string s1;
s1 = Console.ReadLine();
byte[] bytes = Encoding.ASCII.GetBytes(s1);
int result = BitConverter.ToInt32(bytes, 0);
//foreach (int r in bytes)
//{
Console.Write(result);
//}
//byte[] array = new byte[result];
byte[] buffer = System.Text.Encoding.UTF8.GetBytes(s1);
foreach (int a in buffer)
{
Console.WriteLine(buffer);
}
please help me on this