From b81cac03d680a4de4f7de3e899e43b23dc90b253 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Tue, 20 Jul 2021 16:24:16 +0100 Subject: [PATCH] Add CultureInfo argument to exception message format --- X10D/src/ComparableExtensions/ComparableExtensions.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/X10D/src/ComparableExtensions/ComparableExtensions.cs b/X10D/src/ComparableExtensions/ComparableExtensions.cs index 5454a87..efddf64 100644 --- a/X10D/src/ComparableExtensions/ComparableExtensions.cs +++ b/X10D/src/ComparableExtensions/ComparableExtensions.cs @@ -1,4 +1,5 @@ -using System; +using System; +using System.Globalization; namespace X10D { @@ -52,11 +53,11 @@ namespace X10D { throw new ArgumentNullException(nameof(value)); } - + if (lower.GreaterThan(upper)) { throw new ArgumentException( - string.Format(ExceptionMessages.LowerCannotBeGreaterThanUpper, lower, upper), + string.Format(CultureInfo.CurrentCulture, ExceptionMessages.LowerCannotBeGreaterThanUpper, lower, upper), nameof(lower)); }