Struct SwiftISIN

Namespace
Subsembly.Swift
Assembly
Subsembly.Sepa.dll

Wrapper for dealing with ISIN and WKN numbers.

public struct SwiftISIN
Inherited Members

Constructors

SwiftISIN(string)

Creates a SwiftISIN from a real ISIN.

public SwiftISIN(string sISIN)

Parameters

sISIN string

Exceptions

ArgumentNullException

The parameter sISIN was null.

ArgumentException

The parameter sISIN was not a valid ISIN according to the method IsValid(string).

Fields

LENGTH

The required length of any ISIN.

public const int LENGTH = 12

Field Value

int

NullISIN

public static readonly SwiftISIN NullISIN

Field Value

SwiftISIN

Properties

CountryCode

Returns the country code from this ISIN.

public string CountryCode { get; }

Property Value

string

GermanWKN

If this is a German ISIN, then the contained, six character German WKN number is returned. For other ISINs, null is returned.

public string GermanWKN { get; }

Property Value

string

ISIN

Returns the wrapped ISIN or null, if it is NullISIN, or some other security identification that is not an ISIN.

public string ISIN { get; }

Property Value

string

Remarks

As a special case, if this struct holds an German WKN, that is, whenever Kind is National, and CountryCode is "DE", then an attempt is made to generate and return an ISIN for it.

IsNull

public bool IsNull { get; }

Property Value

bool

Kind

Returns the wrapped kind of this ISIN.

public SwiftISINKind Kind { get; }

Property Value

SwiftISINKind

Methods

FromGermanWKN(string)

public static SwiftISIN FromGermanWKN(string sWKN)

Parameters

sWKN string

Returns

SwiftISIN

Exceptions

ArgumentNullException
ArgumentException

IsGermanWKN(string)

public static bool IsGermanWKN(string sWKN)

Parameters

sWKN string

A supposed German WKN. May be null.

Returns

bool

Returns true if, and only if, the given sWKN is not null, and consists of exactly six digits or upper case letters.

IsValid(string)

public static bool IsValid(string sISIN)

Parameters

sISIN string

Returns

bool

Parse(string)

Parse text input from user or from MT files into a valid ISIN.

public static SwiftISIN Parse(string sInput)

Parameters

sInput string

The input to be parsed. If this is null, then the returned value will be NullISIN.

Returns

SwiftISIN

If the input cannot be parsed, then NullISIN is returned. If the input was a valid ISIN, then it is returned.

Remarks

This method does not throw any exceptions, regardless of its input.

ToString()

public override string ToString()

Returns

string