Formatting plain text in C# -
i trying format text sent in email user. currently, printing console make sure formatting correct. used escape characters found while doing research such /r/n
, /t
it's not working. escape characters show in text. example, if put
string somestringvar = boo; "hello world! /r/n" + somestringvar + "/t goodbye!", expect text like:
hello world!
boo -tab- goodbye!
instead, looks this:
hello world! /r/nboo/t goodbye!
why???? i'm sure it's stupid mistake, frustrated figure out. help!
you need use backslashes:
"hello world! \r\n" + somestringvar + "\t goodbye!"
Comments
Post a Comment