Is there a C# syntax with which I can express strings containing double quotes without having to escape them? I frequently copy and paste strings between C# source code to other apps, and it’s frustrating to keep adding and removing backslashes.
Eg. presently for the following string (simple example)
“No,” he said.
I write in C# "\"No,\" he said."
But I’d rather write something like Python '"No," he said.', or Ruby %q{"No," he said.}, so I can copy and paste the contents verbatim to other apps.
Then it sounds like you probably shouldn’t have the strings within source code.
Instead, create text files which are embedded in your assembly, and load them dynamically… or create resource files so you can look up strings by key.
There’s no form of string literal in C# which would allow you to express a double-quote as just a single double-quote character in source code.