int stxval = 0x02; //found this value on wikipedia
string mystring = "Hello";
StringBuilder builder = new StringBuilder(mystring);
builder.Append(stxval);
Here in string builder "2Hello" is appended. how to get string in this form "Hello"?
Use char instead:
char stx = '\u0002';
or
char stx = (char) 2;
Personally I prefer the first option, but it's up to you.
Anyway, then just use:
StringBuilder builder = new StringBuilder(mystring);
builder.Append(stx);
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With