adding a double quote in a string

M

MAF

How do I add a double quote to a string?

I want aShell to be Columns = "col1, col2"
System.Text.StringBuilder aShell = new System.Text.StringBuilder();

aShell.Append("<Test COLUMNS = ? + ">" + System.Environment.NewLine);
 
G

Guest

Escape it with backslash ...

"<Test COLUMNS = \"" + your_string + "\">" + System.Environment.NewLine
 
R

Red Forks

KH said:
Escape it with backslash ...

"<Test COLUMNS = \"" + your_string + "\">" + System.Environment.NewLine
Or using '@' prefix
@"<Test COLUMNS=""" + your_string + @""">" + System.Enviroment.NewLine
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top