System. FormatException: "input string format is not correct,"
How to deal with, small white for advice
CodePudding user response:
The current code verifies the validity of text box input, suggest to switch to float. TryParseCodePudding user response:
Abc123.5 float. Parse (" "); Converts floating-point number you gave me I have a look, make sure to convert the string is a number, such as 123.5CodePudding user response:
Try the Text (). The Trim ();CodePudding user response:
Float. Parse (" ")You input is not floating point data types,
You can use the float. TryParse (string, out float) method
Or a float. The IsNaN method
CodePudding user response:
Assigned to the value type, the best is to assess the legal