The debug program is bitter and happy,
In order to prevent users from directly click to import the following table, so I set a hint, click on the first to determine whether there is no value in the textbox, empty words also in the textbox to do hints
The procedure is as follows:
Point once can be output to the textbox normally, the point of the second time the program has an exception:
First time
Second time:
What's the situation, this is? Set breakpoints did not reflect, a variety of doubts, environmental problems? How to break the breakpoint, have not seen such a strange problem ah, the result suddenly realized
The project set up release mode. thus
Set breakpoint Hint: No breakpoints are currently being hit and no symbols have been loaded for the document;
Change to debug, run, and finally know where the problem is.
The program ran to the else inside, if this has run to else inside go, of course else did not judge is also a problem, this is something, first say if Judge a TextBox judge empty how still run to else inside,
Later, the textbox was assigned value, the first click, the prompt value assigned to the TextBox, so the point is not empty, and then ran to the else inside
Replace with debug, error such as:
Or debug mode is good. Either there is a problem or there is no clue where it is.
Lazy to have to judge the input value of the TextBox output prompt value, the result point two program exception