Alex Rivera | Logout

Heredoc strings in C#

Asked 2010-08-21T18:43:35.783
57

Is there a heredoc notation for strings in C#, preferably one where I don't have to escape anything (including double quotes, which are a quirk in verbatim strings)?

Edit
Report

1 Answer

13

No, there is no "HEREDOC" style string literal in C#.

C# has only two types of string literals:

  • Regular literal, with many escape sequences necessary
  • Verbatim literal, @-quoted: doublequotes need to be escaped by doubling

References

answered 2010-08-21T18:52:57.927

Your Answer