title: How to use string interpolation and verbatim string together to create a JSON string literal?
body: <p>I'm trying to create a string literal representing an array of JSON objects so I thought of using string interpolation feature as shown in the code below:</p>
  
  <pre><code>    public static void MyMethod(string abc, int pqr)
      {
          string p = $"[{{\"Key\":\"{abc}\",\"Value\": {pqr}  }}]";
      }
  </code></pre>
  
  <p>Now I thought of using verbatim string so that I don't have to escape double quotes using backslashes. So I came to know through <a href="https://stackoverflow.com/a/32508711/465053">this</a> answer that verbatim string and string interpolation can be used together. So I changed my code as below:</p>
  
  <pre><code>public static void MyMethod(string abc, int pqr)
  {
      string p = $@"[{{"Key":"{abc}","Value": {pqr} }}]";
  }
  </code></pre>
  
  <p>But it fails to compile. Can anyone help me if there is anything wrong in my usage or it will <em>not</em> be possible to escape double quotes in such a case using string verbatim feature of C#?</p>