diff --git a/X10D/src/ComparableExtensions/ComparableExtensions.cs b/X10D/src/ComparableExtensions/ComparableExtensions.cs
index 1ccecd9..d314c13 100644
--- a/X10D/src/ComparableExtensions/ComparableExtensions.cs
+++ b/X10D/src/ComparableExtensions/ComparableExtensions.cs
@@ -79,7 +79,9 @@ namespace X10D.ComparableExtensions
{
if (lower.GreaterThan(upper))
{
- throw new ArgumentException($@"{lower} cannot be greater than {upper}", nameof(lower));
+ throw new ArgumentException(
+ string.Format(ExceptionMessages.LowerCannotBeGreaterThanUpper, lower, upper),
+ nameof(lower));
}
return value.Max(lower).Min(upper);
diff --git a/X10D/src/ExceptionMessages.Designer.cs b/X10D/src/ExceptionMessages.Designer.cs
index 0e6da91..ed682a4 100644
--- a/X10D/src/ExceptionMessages.Designer.cs
+++ b/X10D/src/ExceptionMessages.Designer.cs
@@ -87,6 +87,15 @@ namespace X10D {
}
}
+ ///
+ /// Looks up a localized string similar to {0} cannot be greater than {1}.
+ ///
+ internal static string LowerCannotBeGreaterThanUpper {
+ get {
+ return ResourceManager.GetString("LowerCannotBeGreaterThanUpper", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to maxValue must be greater than or equal to 0.
///
diff --git a/X10D/src/ExceptionMessages.resx b/X10D/src/ExceptionMessages.resx
index c3f36f9..76f5df6 100644
--- a/X10D/src/ExceptionMessages.resx
+++ b/X10D/src/ExceptionMessages.resx
@@ -53,4 +53,7 @@
maxValue must be greater than or equal to minValue
+
+ {0} cannot be greater than {1}
+
\ No newline at end of file