Class DomainName

Namespace: AutoFixture
Assembly: AutoFixture.dll

Represents a domain name.

public class DomainName

Inheritance

objectDomainName

Inherited Members

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

Constructors

DomainName(string)

Initializes a new instance of the DomainName class. Throws ArgumentNullException if domainName is null. Throws ArgumentException if domainName is empty.

public DomainName(string domainName)

Parameters

domainName string

Properties

Domain

Get the name of the domain.

public string Domain { 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 domain name for this instance.

public override string ToString()

Returns

string

A String that represents the domain name for this instance.