src/fursvp.domain/Validation/ValidateEmail.cs
/// <summary>
/// Throws an Exception if the email address string is not considered valid based on <see cref="MailAddress"/> constructor validation.
/// </summary>
/// <param name="address">The email address.</param>
Throws an Exception if the email address string is not considered valid based on  constructor validation.
Throws an Exception if the email address string is not considered valid based on constructor validation .
public void Validate(string address)
        {
            try
            {
                _ = new MailAddress(address);
            }
            catch (ArgumentNullException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw new ValidationException<string>(ex.Message, ex);
            }
        }
public void Validate ( string address ) { try { _ = new MailAddress ( address ) ; } catch ( ArgumentNullException ) { throw ; } catch ( Exception ex ) { throw new ValidationException < string > ( ex . Message , ex ) ; } }
Throws an Exception if the email address string is not considered valid based on  constructor validation.
Throws an Exception if the email address string is not considered valid based on constructor validation .
// We're not using this MailAddress - we just need to try and create it and see if an exception is thrown.
address
string
The email address.
The email address .