I am trying to convert a string to double but unable to do so...
I tried to simulate a dummy code which is part of my application, the text value comes from a 3rd party application on which i dont have control.
I need to convert the string which is represented in a general format "G" to a double value and show that in a text box.
string text = "G4.444444E+16";
double result;
if (!double.TryParse(text, NumberStyles.Any, CultureInfo.InvariantCulture, out result))
{
}
I tried by changing the numberstyles and cultureinfo but still the result is always returns 0. Suggest what is wrong with the code?