Click to See Complete Forum and Search --> : need to get an ascii code


PareshG
May 20th, 2002, 10:16 AM
Hi

I have a string as

String str = "AT";

i need to append control line feed character

like i need to append ascii value to that string

how would i do that in C#


thanks
Paresh

Buffer0verflow
May 20th, 2002, 02:39 PM
String str = "AT";
i need to append control line feed character
like i need to append ascii value to that string
how would i do that in C#

Same as plain old C here, \n = new line, \r = carriage return.
So:
String str = "AT\n";


Buffer0verflow

jparsons
May 20th, 2002, 04:55 PM
Originally posted by PareshG
Hi

I have a string as

String str = "AT";

i need to append control line feed character

like i need to append ascii value to that string

how would i do that in C#


thanks
Paresh

You also might want to check out System.Environment.NewLine