• API Overview
  • EBICS API
  • FinTS API
  • XS2A API
  • SEPA API
Search Results for

    Struct SepaVatID

    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Subsembly.Sepa
    Assembly: Subsembly.Sepa.dll
    Syntax
    public struct SepaVatID

    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

    A null VAT ID.

    Declaration
    public static readonly SepaVatID NullVatID
    Field Value
    Type Description
    SepaVatID

    Properties

    CountryCode

    The country code of the issuing country.

    Declaration
    public readonly string CountryCode { get; }
    Property Value
    Type Description
    System.String
    Remarks

    If this is a NullVatID, then null is returned.

    If the VAT ID uses the country code "XI" for Northern Ireland, then "GB" will be returned. If the VAT ID uses the country code "EL" for Greece, then "GR" will be returned. ///

    IsNull

    Indicates whether this SepaVatID is a NullVatID.

    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)

    Compares the SepaVatID for equivalence.

    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
    Remarks

    If the VAT ID uses the country code "XI" for Northern Ireland, then "GB" will be returned. If the VAT ID uses the country code "EL" for Greece, then "GR" will be returned.

    GetHashCode()

    Provides a hash code for this SepaVatID.

    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
    Type Description
    SepaVatID
    Remarks

    Any non alphanumeric characters, such as whitespace or symbols, are removed from the captured VAT ID.

    Any lower case letters are converted into upper case letters.

    Operators

    Equality(SepaVatID, SepaVatID)

    Declaration
    public static bool operator ==(SepaVatID lhs, SepaVatID rhs)
    Parameters
    Type Name Description
    SepaVatID lhs
    SepaVatID rhs
    Returns
    Type Description
    System.Boolean

    Inequality(SepaVatID, SepaVatID)

    Declaration
    public static bool operator !=(SepaVatID lhs, SepaVatID rhs)
    Parameters
    Type Name Description
    SepaVatID lhs
    SepaVatID rhs
    Returns
    Type Description
    System.Boolean
    In This Article
    Back to top Copyright 2009-2025 Subsembly GmbH