Class EmailAddressLocalPart

Namespace: AutoFixture
Assembly: AutoFixture.dll

Represents the local part of the email address, defined as everything up to, but not including, the @ sign. Since EmailAddressLocalPart is used in constructing MailAddress, enforcement of rules on a valid email address is performed by MailAddress and not EmailAddressLocalPart other than as noted.

public class EmailAddressLocalPart

Inheritance

objectEmailAddressLocalPart

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

EmailAddressLocalPart(string)

Initializes a new instance of the EmailAddressLocalPart class. Throws ArgumentNullException if localPart is null. Throws ArgumentException if localPart is empty.

public EmailAddressLocalPart(string localPart)

Parameters

localPart string

The local part.

Properties

LocalPart

Get the local part.

public string LocalPart { get; }

Property Value

string

Methods

Equals(object)

Determines whether the specified Object is equal to this instance.

public override bool Equals(object obj)

Parameters

obj object

The Object to compare with this instance.

Returns

bool

true if the specified Object is equal to this instance; otherwise, false.

Exceptions

NullReferenceException

The obj parameter is null.

GetHashCode()

Returns a hash code for this instance.

public override int GetHashCode()

Returns

int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

ToString()

Returns a String that represents the local part for this instance.

public override string ToString()

Returns

string

A String that represents the local part for this instance.