Donate

How To Convert Exponent to Decimal Notation In C#

Good morning,
Here's how you convert exponent value to C# using decimal.parse() function. Make sure to pass NumberStyles.Float from System.Globalization namesapce in the second parameter of the function.
string land_area = "1.21445e-007".ToUpper();  
decimal dec = decimal.Parse(land_area, System.Globalization.NumberStyles.Float); 

Comments

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

How To Insert Or Add Emojis In Microsoft Teams Status Message

Pass GUID As Parameter To Action Using ASP.NET MVC ContribGrid