Types of Raw String Literals

Single-Line Raw String Literal

var singleLineRawString = """This is a raw string""";


Multi-Line Raw String Literal

var multiLineRawString = """
   This is a multi-line raw string.
   It preserves the indentation and
   line breaks as they appear in the code.
   """;


Raw String Literal with Delimiters

var delimiterString = """"This is a "quoted" raw string with delimiters""""; // 4 quotes


Raw String Literal with Interpolation

var name = "World";
var interpolatedString = $"""Hello, {name}!""";


var interpolatedStringWithBraces = $""""{{This is {name}}}""""; // 4 quotes