c# - Why does double.TryParse("6E02", out tempDouble) return true? -
It took me a day's time to find out if the problem is true for a string value that is a statement from . We are parsing to check whether the price is a number or string or not. I came to know that this statement is used and when the string value comes as 6E02, the statement is the correct return that it is a double value How can I resolve this result (number) false for wire like E0 (back The number to go) I believe in checking the first text if I have E0 in it and if it only makes a false return, but this or another put in the method, Is there a better way of changing the method with the maintenance?
double-temp. Variant = "6E02" result = double.TryParse (Val, outside floating)
NumberStyles.Float, which is an alias for the following combinations ::
- Uses the following flag from the NumberStyles.AllowLeadingWhite defaults
- NumberStyles.AllowTrailingWhite
- NumberStyles.AllowLeadingSign
- NumberStyles.AllowDecimalPoint
- NumberStyles.AllowExponent
You only need to You can use to specify a sub-group. Specifically, you want to delete (at least) allow exponent
flag.
Comments
Post a Comment