hi,

how to print "" in c#?

Recommended Answers

All 2 Replies

put a \ in front of it, so rather than

"this is a "test""

which doesnt work

its

"this is a \"test\""

agree with lizr, a lot of times to make the code a little cleaner i would make a constant

const string quote = "\"";
string sample =  "This is a " + quote + "test" + quote;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.