Skip to content

Commit 268b6cb

Browse files
Update README.md
1 parent ea18903 commit 268b6cb

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2402,12 +2402,8 @@ Console.WriteLine(msg);
24022402
**5. Raw interpolated string (C# 11+):**
24032403

24042404
```cs
2405-
string json = $"""
2406-
{{
2407-
"name": "{name}",
2408-
"age": {age}
2409-
}}
2410-
""";
2405+
string json = $$"""{ "name": "{{name}}", "age": {{age}} }""";
2406+
24112407
Console.WriteLine(json);
24122408
```
24132409

0 commit comments

Comments
 (0)