adding a double quote in a string

  • Thread starter Thread starter MAF
  • Start date Start date
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);
 
Escape it with backslash ...

"<Test COLUMNS = \"" + your_string + "\">" + System.Environment.NewLine
 
KH said:
Escape it with backslash ...

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