Struct SepaVatID
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Subsembly.Sepa.dll
Syntax
Constructors
SepaVatID(String)
Declaration
public SepaVatID(string sVatID)
Parameters
Type |
Name |
Description |
System.String |
sVatID |
|
Fields
MAXLENGTH
The maximum length of a valid VAT ID.
Declaration
public const int MAXLENGTH = 14
Field Value
Type |
Description |
System.Int32 |
|
MINLENGTH
The minimum length of a valid VAT ID.
Declaration
public const int MINLENGTH = 4
Field Value
Type |
Description |
System.Int32 |
|
NullVatID
Declaration
public static readonly SepaVatID NullVatID
Field Value
Properties
CountryCode
The country code of the issuing country.
Declaration
public readonly string CountryCode { get; }
Property Value
Type |
Description |
System.String |
|
IsNull
Declaration
public readonly bool IsNull { get; }
Property Value
Type |
Description |
System.Boolean |
|
VatID
Declaration
public readonly string VatID { get; }
Property Value
Type |
Description |
System.String |
|
Methods
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
Right hand side to compare to.
|
Returns
Type |
Description |
System.Boolean |
True if both are the same SepaVatID.
|
Overrides
System.ValueType.Equals(System.Object)
GetCountryCode(String)
If the given VAT ID is valid, then the country code of the issuing country is
returned.
Declaration
public static string GetCountryCode(string sVatID)
Parameters
Type |
Name |
Description |
System.String |
sVatID |
|
Returns
Type |
Description |
System.String |
|
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
Hashcode.
|
Overrides
System.ValueType.GetHashCode()
IsValid(String)
Declaration
public static bool IsValid(string sVatID)
Parameters
Type |
Name |
Description |
System.String |
sVatID |
A strictly formatted VAT ID. If this is null or an empty string, then
false is returned.
|
Returns
Type |
Description |
System.Boolean |
If a syntactically valid VAT ID was given, then true is returned.
Otherwise, false is returned.
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.ValueType.ToString()
TryCapture(String)
Try to capture a user entered VAT ID.
Declaration
public static SepaVatID TryCapture(string sPaperVatID)
Parameters
Type |
Name |
Description |
System.String |
sPaperVatID |
A string that represents a VAT ID that was manually entered by an user. It may
contain blanks and may use lower case letters. If this is null or an
empty string, then NullVatID is returned.
|
Returns
Operators
Equality(SepaVatID, SepaVatID)
Declaration
public static bool operator ==(SepaVatID lhs, SepaVatID rhs)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Inequality(SepaVatID, SepaVatID)
Declaration
public static bool operator !=(SepaVatID lhs, SepaVatID rhs)
Parameters
Returns
Type |
Description |
System.Boolean |
|