ToDecimal

        public static decimal ToDecimal(this string value)
        {
            decimal number;

            Decimal.TryParse(value, out number);

            return number;
        }
Example:
string number = "1.2";
decimal converted = number.Decimal();

Description

Convert string to decimal

Details

Double click on the code to select all.

 

;