Is it possible to parse signed zero? I tried several approaches but no one gives the proper result:
float test1 = Convert.ToSingle(\"-0.0\");
float test2 = f
You can try this:
string target = "-0.0";
decimal result= (decimal.Parse(target,
System.Globalization.NumberStyles.AllowParentheses |
System.Globalization.NumberStyles.AllowLeadingWhite |
System.Globalization.NumberStyles.AllowTrailingWhite |
System.Globalization.NumberStyles.AllowThousands |
System.Globalization.NumberStyles.AllowDecimalPoint |
System.Globalization.NumberStyles.AllowLeadingSign));