Table of Contents

ThrowIfNotEmailAddress Method

Definition

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

ThrowIfNotEmailAddress(string, string, string)

Validates and throws an ArgumentException if the specified argument does not have the format of an email address.

public static void ThrowIfNotEmailAddress(string argument, string message = "Value must be an email address.", 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

ArgumentException

argument must be an email address.