HowTo: Parse a number from Exponential notation

To parse a number from string given in Exponential Notation necessary is to use following piece of code:
  1. decimal myDecimalValue = Decimal.Parse("1,11E-04", System.Globalization.NumberStyles.Float);      
  2. Console.WriteLine(myDecimalValue); //Result is: 0.000111  
 If parsing is not possible due to wrong format of string we got an exception. To avoid this situation we can use following piece of code:
  1. decimal result;  
  2. Decimal.TryParse("1.11E-04", System.Globalization.NumberStyles.Float, nullout result);  
In this case, when parsing is not possible - result variable will be set to 0, but not exception will be thrown. Please note in this approach we have to use "out" parameter. TryParse of Decimal returns bool - if parsing was possible or not.