How to include quotes in a string

learning picture learning · Aug 11, 2010 · Viewed 266.9k times · Source

I have a string "I want to learn "c#"". How can I include the quotes before and after c#?

Answer

kennytm picture kennytm · Aug 11, 2010

Escape them with backslashes.

"I want to learn \"C#\""