Skip to content

Commit

Permalink
fixup! Use pattern in a couple of places
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwald committed Nov 21, 2024
1 parent 724b029 commit 53c62bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MaxMind.MinFraud/Request/CustomInputs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void Add(string key, int value)
/// </param>
public void Add(string key, long value)
{
if (value <= -NumMax || value >= NumMax)
if (value is <= -NumMax or >= NumMax)
{
throw new ArgumentException($"The custom input number {value} is invalid. " +
$"The number must be between -{NumMax} and {NumMax}, exclusive");
Expand All @@ -116,7 +116,7 @@ public void Add(string key, long value)
/// </param>
public void Add(string key, float value)
{
if (value <= -NumMax || value >= NumMax)
if (value is <= -NumMax or >= NumMax)
{
throw new ArgumentException($"The custom input number {value} is invalid. " +
$"The number must be between -{NumMax} and {NumMax}, exclusive");
Expand All @@ -135,7 +135,7 @@ public void Add(string key, float value)
/// </param>
public void Add(string key, double value)
{
if (value <= -NumMax || value >= NumMax)
if (value is <= -NumMax or >= NumMax)
{
throw new ArgumentException($"The custom input number {value} is invalid. " +
$"The number must be between -{NumMax} and {NumMax}, exclusive");
Expand Down

0 comments on commit 53c62bf

Please sign in to comment.