I have variable like:
string title = string.empty;
My need is that whatever string is passed to it I have to display the content inside a div with in a double quotes. So I have written something like:
...
...
<div>"+ title +@"</div>
...
...
But how to add the double quotes here? So that it will display like :
"How to add double quotes"
You need to escape them by doubling them (verbatim string literal):
string str = @"""How to add doublequotes""";
Or with a normal string literal you escape them with a \
:
string str = "\"How to add doublequotes\"";