VknOrTckn

Field: static readonly VknOrTckn Empty

Returns a blank TC ID or tax number.


Method: static VknOrTckn Parse(String)

it creates and returns the VknOrTckn object with the ID number or tax ID of the string type. If the value is 10 digits, it is subject to the tax number algorithm and if it is 11 digits, it is subject to TC ID no.

    VknOrTckn.Parse("4700612053"); //Vkn
    VknOrTckn.Parse("17017251318"); //Tckn
Parameter Name Description
vknOrTcknString TC identification number or tax number in string type

Error Type: ArgumentNullException (This error is thrown if the value set null.)

Error Type: FormatException (This error is thrown if the value does not conform to the TC identity algorithm or the tax number algorithm.)


Constructor(Vkn)

Vkn forms the object VknOrTckn with the tax number.

    new VknOrTckn(Vkn.Parse("4700612053"));
Parameter Name Description
vkn Tax number of type Vkn

Constructor(Tckn)

Tckn forms the object VknOrTckn with the TC identity number.

    new VknOrTckn(Tckn.Parse("17017251318"));
Parameter Name Description
tckn TC identification number of type Tckn

Property: bool IsVkn

Returns true if the data contains the tax number, false if it does not.

    VknOrTckn.Parse("4700612053").IsVkn; //true
    VknOrTckn.Parse("17017251318").IsVkn; //false

Property: bool IsTckn

Returns true if the data contains the ID number of the TC, false if it does not.

    VknOrTckn.Parse("17017251318").IsTckn; //true
    VknOrTckn.Parse("4700612053").IsTckn; //false

Property: string Value

It calls the ToString method directly.


Method: bool ToString()

If the data contains the tax ID number, the tax number returns the TC ID number if the TC ID number is included, or null data if no value assignments have been made.

ToString result value of the default value is empty.

    VknOrTckn.Parse("4700612053").ToString(); //Vkn: 4700612053
    VknOrTckn.Parse("17017251318").ToString(); //Tckn: 17017251318
    VknOrTckn.Empty.ToString(); //string.Empty 

    default(VknOrTckn).ToString(); //string.Empty

Method: object Clone()

It creates and returns a new instance with the TC ID number or tax number held in the string type of the Instance.

    VknOrTckn vknOrTckn = VknOrTckn.Parse("4700612053").Clone();

Method: bool Equals(Object)

Returns true if the given object has the same value as the VknOrTckn object and the data, false otherwise.

Parameter Name Description
obj Object to be compared

Method: bool Equals(VknOrTckn)

Returns true if the given VknOrTckn object has the same value as the data, false otherwise.

Parameter Name Description
other The object of type VknOrTckn to be compared