Class Address

Address class

Address of creditor or debtor.

You can either set street, house number, postal code and town (type structured address) or address line 1 and 2 (type combined address elements). The type is automatically set once any of these fields is set. Before setting the fields, the address type is undetermined. If fields of both types are set, the address type becomes conflicting. Name and country code must always be set unless all fields are empty.

public sealed class Address : IEquatable<Address>

Constructors

NameDescription
Address()Creates instance of Address

Properties

NameDescription
AddressLine1 { get; set; }Gets or sets the address line 1.
AddressLine2 { get; set; }Gets or sets the address line 2.
CountryCode { get; set; }Gets or sets the two-letter ISO country code.
HouseNo { get; set; }Gets or sets the house number.
Name { get; set; }Gets or sets the name, either the first and last name of a natural person or the company name of a legal person.
PostalCode { get; set; }Gets or sets the postal code.
Street { get; set; }Gets or sets the street.
Town { get; set; }Gets or sets the town or city.
Type { get; }Gets the address type.

Methods

NameDescription
Clear()Clears all fields and sets the type to Undetermined.
Equals(Address)Determines whether the specified address is equal to the current address.
override Equals(object)Determines whether the specified object is equal to the current object.
override GetHashCode()Gets the hash code for this instance.

See Also