Half a day looking for this bug. Why is there an unexpected result in the third case?
// case 1
string value1 = "a" + "a" + "A";
byte[] asciiBytes1 = Encoding.ASCII.GetBytes(value1); // expected: 97 - 97 - 65
Console.WriteLine(string.Join(" - ", asciiBytes1)); // result: 97 - 97 - 65
// case 2
string value21 = 'a' + "A";
byte[] asciiBytes21 = Encoding.ASCII.GetBytes(value21); // expected: 97 - 65
Console.WriteLine(string.Join(" - ", asciiBytes21)); // result: 97 - 65
// case 3
string value22 = 'a' + 'a' + "A";
byte[] asciiBytes22 = Encoding.ASCII.GetBytes(value22); // expected: 97 - 97 - 65
Console.WriteLine(string.Join(" - ", asciiBytes22)); // result: 49 - 57 - 52 - 65