Table of Contents

ThrowIfEmailAddress Method

Definition

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

ThrowIfEmailAddress(string, string, string)

Validates and throws an ArgumentException if the specified argument has the format of an email address.

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