Replies: 2 comments
-
You don't use the string foo = "something else";
string s = $$"""{"property": "{{foo}}"}"""; IIRC the ability to double-up interpolation indicators is not supported with verbatim strings, only raw strings. |
Beta Was this translation helpful? Give feedback.
0 replies
-
You have raw string literals: #4304 Ok, @HaloFour answered just before :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a verbatim string that represents a JSON string, like this:
Now, I'd like to change
"somevalue"
to the contents of a variable using string interpolation, so I thought I'd be able to do this:or even this:
However, the compiler issues this error:
If I switch the verbatim indicator and the string-interpolation indicator, the same error remains.
Is it not possible to combine both in this case ?
I have specified the 'Preview' LangVersion in my csproj file.
Beta Was this translation helpful? Give feedback.
All reactions