Add CultureInfo argument to exception message format

This commit is contained in:
Oliver Booth 2021-07-20 16:24:16 +01:00
parent 1205290ab4
commit b81cac03d6
No known key found for this signature in database
GPG Key ID: A4AC17007530E9B4
1 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,5 @@
using System; using System;
using System.Globalization;
namespace X10D namespace X10D
{ {
@ -52,11 +53,11 @@ namespace X10D
{ {
throw new ArgumentNullException(nameof(value)); throw new ArgumentNullException(nameof(value));
} }
if (lower.GreaterThan(upper)) if (lower.GreaterThan(upper))
{ {
throw new ArgumentException( throw new ArgumentException(
string.Format(ExceptionMessages.LowerCannotBeGreaterThanUpper, lower, upper), string.Format(CultureInfo.CurrentCulture, ExceptionMessages.LowerCannotBeGreaterThanUpper, lower, upper),
nameof(lower)); nameof(lower));
} }