SoFunction
Updated on 2025-03-06

C# implements the conversion of scientific notation method (E) into normal numerical values

1. The string value contains scientific notation methods such as E, such as 12E-2, and needs to be converted into a normal value of 0.12,

2. The conversion function is as follows:

Copy the codeThe code is as follows:

 private Decimal ChangeDataToD(string strData)
        {
            Decimal dData = 0.0M;
            if (("E"))
            {
                dData = (((), ));
            }
            return dData;
        }

3. Call ChangeDataD(strText) directly when calling

4. After running, it is 0.12.