I am integrating a library with my c# code. There is a decimal parameter i am using from the library. Parameter return usual decimal values mostly like: 0.24756400. But sometimes it returns values in Exponential format like: 0E-8.
When i try process the parameter in my code, for example when i parse it like this:
Decimal.Parse(paymentAuth.IyziCommissionFee);)
it gives me exception
Object reference not set to an instance of an object) when the value is in Exponential format.
If i can identify the value format (number or Exponential number) i can manage it.
So how can i identify if the value is in Exponential format? Alternatively, any suggestion to manage such situation?