From ab184191deaead5ada96a5ded32b495478ba3124 Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Mon, 9 Jun 2025 22:34:05 -0700 Subject: [PATCH] Wrap listing --- src/Chapter02/Listing02.09.UsingStringFormat.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Chapter02/Listing02.09.UsingStringFormat.cs b/src/Chapter02/Listing02.09.UsingStringFormat.cs index fa18afa2..9a7feaad 100644 --- a/src/Chapter02/Listing02.09.UsingStringFormat.cs +++ b/src/Chapter02/Listing02.09.UsingStringFormat.cs @@ -18,12 +18,16 @@ public static void Main() currencyText = $"{number:C}"; Console.WriteLine(currencyText); - // Prove that string interpolation and the ToString method produce equivalent results with format specifiers + // Prove that string interpolation and the ToString method + // produce equivalent results with format specifiers string toStringCurrencyText = number.ToString("C"); - Console.WriteLine($"{currencyText == toStringCurrencyText}: {currencyText} == {toStringCurrencyText}"); + Console.WriteLine( + $"{currencyText == toStringCurrencyText}: " + + $"{currencyText} == {toStringCurrencyText}"); // el-GR represents the Greek locale code - toStringCurrencyText = number.ToString("C", CultureInfo.GetCultureInfo("el-GR")); + toStringCurrencyText = number.ToString("C", + CultureInfo.GetCultureInfo("el-GR")); Console.WriteLine(toStringCurrencyText); // ...