I asked "Do you have learned VB.NET?" You said: "I have learned, and I used it very familiar!" I asked: "Do you know the short circuit concept of VB.NET?" You will say: "Of course, Not logical and or those # $% ^ & *? ......
I said: "Yes, it is those things! I will give you a program to see if you can get it?"
"No problem!" You said.
Below is a segment program, it is very simple, see if you can get it. IF not equals (txtage.text, string.empty) and cint (txtage.text)> 100 Then Debug.writeLine ("OK") endiff
Construct your own procedure, add this code, then empty your txtage text box, run thousands!
BT? Run a thousand times?
^ _ ^, Of course, don't need so much, just do tens of times!
Everyone predicts what happens!
Thinking ...
"Show ok?" You tested it!
I can only say that you have run the program! I have no way to say that you are right or wrong!
You are impatiently constructed the program, then press F5.
Hey! I can only watch you smile!
Why? why? You may not understand why a dialog is popped up, it is a transformation error!
This is the result I want to see!
That's right, this is correct, this error is correct.
You look at the dialogue with a red icon, Wondering ...
"No! How can it be?" You have a small voice!
I want to tell you that this wrong dialog is true, not a VS bug!
The short circuit said in the book is * &% ^ $ # @! 8 & ^% ^%?
Do not! Because there is something in VB.NET, named Andalso!
I haven't finished finishing, I will understand! ^ _ ^
There are two special logical operators in VB.NET, one is the front of Andalso, and the other is ORSE.
Remember, these two only follow the short circuit algorithm!
UNDERSTAND?