Struct SwiftISIN
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
sISINstring
Exceptions
- ArgumentNullException
The parameter
sISINwasnull.- ArgumentException
The parameter
sISINwas 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
NullISIN
public static readonly SwiftISIN NullISIN
Field Value
Properties
CountryCode
Returns the country code from this ISIN.
public string CountryCode { get; }
Property Value
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
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
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
Kind
Returns the wrapped kind of this ISIN.
public SwiftISINKind Kind { get; }
Property Value
Methods
FromGermanWKN(string)
public static SwiftISIN FromGermanWKN(string sWKN)
Parameters
sWKNstring
Returns
Exceptions
IsGermanWKN(string)
public static bool IsGermanWKN(string sWKN)
Parameters
sWKNstringA supposed German WKN. May be
null.
Returns
- bool
Returns
trueif, and only if, the givensWKNis notnull, and consists of exactly six digits or upper case letters.
IsValid(string)
public static bool IsValid(string sISIN)
Parameters
sISINstring
Returns
Parse(string)
Parse text input from user or from MT files into a valid ISIN.
public static SwiftISIN Parse(string sInput)
Parameters
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()