I am trying to add 3 control characters to a string. The following is the code
String ackMessage = splitted[0];
String[] msh = ackMessage.Split('|');
String controlID = msh[9];
StringBuilder sb = new StringBuilder();
sb.Append((byte) 0x0b);
sb.AppendLine(ackMessage);
sb.Append("MSA|AA|" + controlID);
sb.Append((byte) 0x1c);
sb.Append((byte) 0x0d);
string myMessage = sb.ToString();
I want the sp.append byte commands to be the actuall ascii character code. Can some tell me how to do this in C#?
Thank you.