c# – How to use double quotes in a string when using the @ symbol?

c# – How to use double quotes in a string when using the @ symbol?

I believe this should work:

string myString = @Here is my quoted text.;

You double the quotes inside a verbatim string to get a quote character.

This makes your given sample:

(@PREFIX rdfs: < + rdfs + @>
      SELECT ?s ?p ?o
        WHERE { ?s ?p rdfs:Literal }
              {?s rdfs:label date});

c# – How to use double quotes in a string when using the @ symbol?

You can use this if you want to write into a file :

string myString = @Here is my quotedtext.;
myString.Replace(@,@&quot;);

Leave a Reply

Your email address will not be published. Required fields are marked *