Class Address
Namespace: Aspose.BarCode.ComplexBarcode
Assembly: Aspose.BarCode.dll (25.2.0)
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>
Inheritance
Implements
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
Address()
Creates instance of Address
public Address()
Properties
AddressLine1
Gets or sets the address line 1.
Address line 1 contains street name, house number or P.O. box.
Setting this field sets the address type to Aspose.BarCode.ComplexBarcode.AddressType.CombinedElements unless it's already Aspose.BarCode.ComplexBarcode.AddressType.Structured, in which case it becomes Aspose.BarCode.ComplexBarcode.AddressType.Conflicting.
This field is only used for combined elements addresses and is optional.
public string AddressLine1 { get; set; }
Property Value
AddressLine2
Gets or sets the address line 2.
Address line 2 contains postal code and town.
Setting this field sets the address type to Aspose.BarCode.ComplexBarcode.AddressType.CombinedElements unless it's already Aspose.BarCode.ComplexBarcode.AddressType.Structured, in which case it becomes Aspose.BarCode.ComplexBarcode.AddressType.Conflicting.
This field is only used for combined elements addresses. For this type, it's mandatory.
public string AddressLine2 { get; set; }
Property Value
CountryCode
Gets or sets the two-letter ISO country code.
The country code is mandatory unless the entire address contains null
or emtpy values.
public string CountryCode { get; set; }
Property Value
HouseNo
Gets or sets the house number.
Setting this field sets the address type to Aspose.BarCode.ComplexBarcode.AddressType.Structured unless it's already Aspose.BarCode.ComplexBarcode.AddressType.CombinedElements, in which case it becomes Aspose.BarCode.ComplexBarcode.AddressType.Conflicting.
This field is only used for structured addresses and is optional.
public string HouseNo { get; set; }
Property Value
Name
Gets or sets the name, either the first and last name of a natural person or the company name of a legal person.
public string Name { get; set; }
Property Value
PostalCode
Gets or sets the postal code.
Setting this field sets the address type to Aspose.BarCode.ComplexBarcode.AddressType.Structured unless it's already Aspose.BarCode.ComplexBarcode.AddressType.CombinedElements, in which case it becomes Aspose.BarCode.ComplexBarcode.AddressType.Conflicting.
This field is only used for structured addresses. For this type, it's mandatory.
public string PostalCode { get; set; }
Property Value
Street
Gets or sets the street.
The street must be speicfied without house number.
Setting this field sets the address type to Aspose.BarCode.ComplexBarcode.AddressType.Structured unless it's already Aspose.BarCode.ComplexBarcode.AddressType.CombinedElements, in which case it becomes Aspose.BarCode.ComplexBarcode.AddressType.Conflicting.
This field is only used for structured addresses and is optional.
public string Street { get; set; }
Property Value
Town
Gets or sets the town or city.
Setting this field sets the address type to Aspose.BarCode.ComplexBarcode.AddressType.Structured unless it's already Aspose.BarCode.ComplexBarcode.AddressType.CombinedElements, in which case it becomes Aspose.BarCode.ComplexBarcode.AddressType.Conflicting.
This field is only used for structured addresses. For this type, it's mandatory.
public string Town { get; set; }
Property Value
Type
Gets the address type.
The address type is automatically set by either setting street / house number or address line 1 and 2. Before setting the fields, the address type is Undetermined. If fields of both types are set, the address type becomes Conflicting.
public AddressType Type { get; }
Property Value
Methods
Clear()
Clears all fields and sets the type to Aspose.BarCode.ComplexBarcode.AddressType.Undetermined.
public void Clear()
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
obj
object
The object to compare with the current object.
Returns
true
if the specified object is equal to the current object; otherwise, false
.
Equals(Address)
Determines whether the specified address is equal to the current address.
public bool Equals(Address other)
Parameters
other
Address
The address to compare with the current address.
Returns
true
if the specified object is equal to the current object; otherwise, false
.
GetHashCode()
Gets the hash code for this instance.
public override int GetHashCode()
Returns
A hash code for the current object. </address>