From 2054119356cf98116e38b3f855775bec14224d6f Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 17 Oct 2023 08:50:34 -0700 Subject: [PATCH] fix: Nit on string interopolation --- src/Chapter22/Listing22.01.UnsychronizedState.cs | 2 +- src/Chapter22/Listing22.02.UnsychronizedLocalVariables.cs | 2 +- src/Chapter22/Listing22.03.SynchronizingWithMonitor.cs | 2 +- src/Chapter22/Listing22.04.SynchronizingWithLockKeyword.cs | 2 +- src/Chapter22/Listing22.05.AsyncMain.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Chapter22/Listing22.01.UnsychronizedState.cs b/src/Chapter22/Listing22.01.UnsychronizedState.cs index 04e5c28b..c8a7b1e1 100644 --- a/src/Chapter22/Listing22.01.UnsychronizedState.cs +++ b/src/Chapter22/Listing22.01.UnsychronizedState.cs @@ -13,7 +13,7 @@ public static int Main(string[] args) { if (args?.Length > 0) { _ = int.TryParse(args[0], out _Total); } - Console.WriteLine($"Increment and decrementing " + + Console.WriteLine("Increment and decrementing " + $"{_Total} times..."); // Use Task.Factory.StartNew for .NET 4.0 diff --git a/src/Chapter22/Listing22.02.UnsychronizedLocalVariables.cs b/src/Chapter22/Listing22.02.UnsychronizedLocalVariables.cs index e39c4936..f954e645 100644 --- a/src/Chapter22/Listing22.02.UnsychronizedLocalVariables.cs +++ b/src/Chapter22/Listing22.02.UnsychronizedLocalVariables.cs @@ -10,7 +10,7 @@ public static int Main(string[] args) { int total = int.MaxValue; if (args?.Length > 0) { _ = int.TryParse(args[0], out total); } - Console.WriteLine($"Increment and decrementing " + + Console.WriteLine("Increment and decrementing " + $"{total} times..."); int x = 0; Parallel.For(0, total, i => diff --git a/src/Chapter22/Listing22.03.SynchronizingWithMonitor.cs b/src/Chapter22/Listing22.03.SynchronizingWithMonitor.cs index 7ac00195..c182a494 100644 --- a/src/Chapter22/Listing22.03.SynchronizingWithMonitor.cs +++ b/src/Chapter22/Listing22.03.SynchronizingWithMonitor.cs @@ -16,7 +16,7 @@ public class Program public static int Main(string[] args) { if (args?.Length > 0) { _ = int.TryParse(args[0], out _Total); } - Console.WriteLine($"Increment and decrementing " + + Console.WriteLine("Increment and decrementing " + $"{_Total} times..."); // Use Task.Factory.StartNew for .NET 4.0 diff --git a/src/Chapter22/Listing22.04.SynchronizingWithLockKeyword.cs b/src/Chapter22/Listing22.04.SynchronizingWithLockKeyword.cs index bb81b14d..3603e918 100644 --- a/src/Chapter22/Listing22.04.SynchronizingWithLockKeyword.cs +++ b/src/Chapter22/Listing22.04.SynchronizingWithLockKeyword.cs @@ -15,7 +15,7 @@ public class Program public static int Main(string[] args) { if (args?.Length > 0) { _ = int.TryParse(args[0], out _Total); } - Console.WriteLine($"Increment and decrementing " + + Console.WriteLine("Increment and decrementing " + $"{_Total} times..."); // Use Task.Factory.StartNew for .NET 4.0 diff --git a/src/Chapter22/Listing22.05.AsyncMain.cs b/src/Chapter22/Listing22.05.AsyncMain.cs index dcca05bb..9749e3c8 100644 --- a/src/Chapter22/Listing22.05.AsyncMain.cs +++ b/src/Chapter22/Listing22.05.AsyncMain.cs @@ -15,7 +15,7 @@ public static async Task Main(string[] args) #endregion HIGHLIGHT { if (args?.Length > 0) { _ = int.TryParse(args[0], out _Total); } - Console.WriteLine($"Increment and decrementing " + + Console.WriteLine("Increment and decrementing " + $"{_Total} times..."); // Use Task.Factory.StartNew for .NET 4.0