Table of Contents

Method ThrowIfNullOrEmpty

Namespace
Gamelogic.Extensions
Assembly
Gamelogic.Extensions.dll

ThrowIfNullOrEmpty(string, string)

Throws an ArgumentNullException if the string is null or empty.

public static string ThrowIfNullOrEmpty(this string obj, string objArgName = null)

Parameters

obj string

The string to check.

objArgName string

The name of the argument.

Returns

string

The original string if it is not null or empty.

Exceptions

ArgumentNullException

obj is null or empty.