Table of Contents

Method ThrowIfNegative

Namespace
Gamelogic.Extensions
Assembly
Gamelogic.Extensions.dll

ThrowIfNegative(int, string)

Throws an ArgumentOutOfRangeException if the integer is negative.

public static void ThrowIfNegative(this int argument, string argName)

Parameters

argument int

The integer to check.

argName string

The name of the argument.

Exceptions

ArgumentOutOfRangeException

argument is negative.

ThrowIfNegative(float, string)

Throws an ArgumentOutOfRangeException if the float is negative.

public static void ThrowIfNegative(this float argument, string argName)

Parameters

argument float

The float to check.

argName string

The name of the argument.

Exceptions

ArgumentOutOfRangeException

argument is negative.