Table of Contents

Method ThrowIfNegative

Namespace
Gamelogic.Extensions
Assembly
Gamelogic.Extensions.dll

ThrowIfNegative(int, string)

Throws a ArgumentOutOfRange exception 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

ThrowIfNegative(float, string)

Throws a ArgumentOutOfRange exception 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