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

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -