Skip to content

Commit c1eb891

Browse files
fix: Add line breaks inside brackets in interpolated string
Fixes #617
1 parent c547aea commit c1eb891

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Errata.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Zhou Jing | 23 | 1080 | Change "DWORD flProtect); // The type of memory allocati
4040
Zhou Jing | 22 | 1065 - 1066 | Changed 'Thread' to 'Task' and "Application exiting" to "Application shutting down"
4141
Zhou Jing | 4 | 161 | Fix `input < 9` to `input < 0` in Listing 4.24
4242
Zhou Jing | 4 | 119 | Show inconsistent size multi-dimensional array in listing 3.16
43-
Zhou Jing | 3 | 114 | Replace `second` with `third` in "// Retrieve third item from the end (Python)"
43+
Zhou Jing | 3 | 114 | Replace `second` with `third` in "// Retrieve third item from the end (Python)"
4444
Tyler Woody | 13 | 702 | Remove the `!` negation in `string.IsNullOrWhiteSpace(input)` in the while loop to properly allow looping
4545
Benjamin Michaelis | 19 | 948-949 | Add a `(` before the `next + 1` to complete the parenthesis.
46+
Zhou Jing | 2 | 70 | Add breaks inside the brackets in the string interpolation in listing 2.16

src/Chapter02/Listing02.16.NewLinesWithinStringInterpolation.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ public static void Main()
1414
lastName = Console.ReadLine();
1515

1616
#region INCLUDE
17-
Console.WriteLine($@"Your full name is: {firstName} {lastName}");
17+
Console.WriteLine($"Your full name is: {
18+
firstName +
19+
" " +
20+
lastName
21+
}");
1822
#endregion INCLUDE
1923
}
2024
}

0 commit comments

Comments
 (0)