Skip to content

Escaping curly brackets sample: .NET 10, interpolated, raw string and verbatim examples - #2357

Merged
vladimir-pecanac-main merged 2 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/104024-chsarp-how-to-escape-curly-brackets-and-special-characters
Nov 9, 2026
Merged

vladimir-pecanac-main merged 2 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/104024-chsarp-how-to-escape-curly-brackets-and-special-characters

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Retargets both projects in strings-csharp/EscapingCurlyBracketsInFormatStrings to net10.0 and moves the test project to MSTest 4.5.2, Microsoft.NET.Test.Sdk 18.11.0 and coverlet.collector 10.1.0. BackslashEscaping now uses the regular escaped string the article explains, and new examples cover an unescaped brace that throws FormatException, escaped braces in an interpolated string, braces around a format item with a D5 specifier, a $$ raw string literal for JSON, and the verbatim and raw forms of the quote and backslash cases, with a test for each (12 in all).

@vladimir-pecanac-main
vladimir-pecanac-main merged commit ac2c45f into CodeMazeBlog:main Nov 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant