Table of Contents

ThrowIfNullOrWhitespace Method

Definition

Namespace
Cuemon
Assemblies
Cuemon.Kernel.dll
Source
src/Cuemon.Kernel/Validator.cs

ThrowIfNullOrWhitespace(string, string, string)

Validates and throws either an ArgumentNullException or ArgumentException if the specified argument is respectively null, empty or consist only of white-space characters.

public static void ThrowIfNullOrWhitespace(string argument, string message = null, string paramName = null)

Parameters

argument string

The value to be evaluated.

message string

A message that describes the error.

paramName string

The name of the parameter that caused the exception.

Exceptions

ArgumentNullException

argument cannot be null.

ArgumentException

argument cannot be empty or consist only of white-space characters.