I am trying to convert a string into a byte array. When I look at individual elements of the The byte array I get unexpected results. For example, when I look at the first element, which was "F", I expect it to be converted to 15, but instead I get 102. Is there an error here?
Console.WriteLine("string[0] = " + string[0]);
Byte[] data = Encoding.ASCII.GetBytes(string);
Console.WriteLine("data[0] = " + data[0]);
string[0] = f
data[0] = 102