Rate

Field: static readonly Rate MinValue

It is the smallest Rate value (-1000000).


Field: static readonly Rate MaxValue

It is the biggest Rate value (1000000).


Method: static Rate Parse(String)

The method that creates the Rate object with the value of the string type and (+/-)###.###### format.

The decimal point must be a period(.).

    Rate.Parse(Rate.MaxValue.ToString());
Parameter Name Description
valueString object in string type and (+/-)###.###### format

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

Error Type: FormatException (This error is thrown if the value is empty.)


Constructor(Double)

Creates the Rate object with the value of the given double type.

    new Rate(1); //10000
Parameter Name Description
value Percent value in double type

Error Type: ArgumentOutOfRangeException (This error is thrown if the value is not between -1000000 and 1000000.)


Property: double Value

Returns the Rate value of type double.


Method: int CompareTo(Object)

If the value of the given object is greater than the value of the Rate data, it returns -1, 0 if it is equal, and 1 if it is smaller. The given object must be of type Rate.

Parameter Name Description
obj Object to be compared

Error Type: ArgumentException (This error is thrown if the value is not Rate type.)


Method: int CompareTo(Rate)

If the value of the given object is greater than the value of the Money data, it returns -1, 0 if it is equal, and 1 if it is smaller.

Parameter Name Description
other Rate object to compare

Method: int ToString()

Returns the value of the Rate object of the string type multiplied by 10000.

    new Rate(1).ToString());       //"10000"  
    new Rate(0.1).ToString());     //"1000"  
    new Rate(0.01).ToString());    //"100"   
    new Rate(0.001).ToString());   //"10"    
    new Rate(0.0001).ToString());  //"1"     
    new Rate(0).ToString());       //"0"     
    new Rate(-0).ToString());      //"0"     
    new Rate(-0.0001).ToString()); //"-1"    
    new Rate(-0.001).ToString());  //"-10"   
    new Rate(-0.01).ToString());   //"-100"  
    new Rate(-0.1).ToString());    //"-1000" 
    new Rate(-1).ToString());      //"-10000"

Method: bool Equals(Object)

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

Parameter Name Description
obj Object to be compared

Method: bool Equals(Rate)

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

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