Table of Contents

Method ThrowIfNegative

Namespace
Gamelogic.Extensions
Assembly
Gamelogic.Extensions.dll

ThrowIfNegative(int, string)

Throws a ArgumentOutOfRange exception if the integer is negative.

[Version(1, 4, 1)]
public static void ThrowIfNegative(this int n, string name)

Parameters

n int

The integer to check.

name string

The name of the variable.

Exceptions

ArgumentOutOfRangeException

ThrowIfNegative(float, string)

Throws a ArgumentOutOfRange exception if the float is negative.

[Version(1, 4, 1)]
public static void ThrowIfNegative(float x, string name)

Parameters

x float

The float to check.

name string

The name of the variable.

Exceptions

ArgumentOutOfRangeException