The argument to the "exit()" function is passed back to the calling process by the operating system. If you run the program from a command line, a command line script may be able use the return value to cause it to do something, or it may simply ignore the return value. If the calling program is another program (through a system() call, for example), the return value may mean something significant to allow the calling program take action dependent on the returned value.
The actual mechanism for returning a value is not part of the C language (it's operating-system dependent). The only two values defined in Standard C are the EXIT_SUCCESS, or EXIT_FAILURE macros in <stdlib.h>. That is, "exit(3)", for example, may cause different actions, depending on the operating system.
The statement "exit(EXIT_SUCCESS)" is equivalent to exit(0). The result of an "exit(0)" is the same as a "return 0;" at the end of main().
Typically people use "return(0)" or "exit(0)" or "exit(EXIT_SUCCESS)" unless they want to give the calling program to discriminate between a satisfactory termination and termination caused by an error condition.
You normally use exit(0) if everything went ok. But if your program detects an error and decides to abort, you would use exit(1). Or you might use exit(1), exit(2), etc, with each exit code meaning some specific error.
Read more about exit code - http://www.chicagotech.net/troubleshooting/exitcode0.htm
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...