How's it going? Now your program does not display the contact form, it only pops up the message box window. You write a new main () method, and you give the program a new entry point. The first thing the program does now is run the instruction in main--that is, run MessageBox.Show (). There is no other instruction in main except this one, so when you click on the OK button, the program does not have a command to execute, it will stop.
5 Think about how to fix your program so that it can also eject the contact window.
Q: What are braces for?
A: C # uses curly braces to organize instructions into blocks of code. Curly braces are always in pairs. You can always see a closing parenthesis after an opening parenthesis. The IDE matches the braces--click on a bracket, its pair bracket and it will be shaded.
Q: I don't know what the entry point is. Can you explain it to me again?
A: The program has a lot of instructions. But they are not executed together. The program starts with the first instruction, then the next, next, next, and so on. These instructions are usually organized into classes, how does the program know where to start? That's how the entry point came in. The compiler cannot compile your code unless there is an entry point called the main () method. The program begins execution from the first instruction in the main () method.
Q: How did I get an error in the Error list while I was running? I think only the "build solution" is going to be like that.
A: Because the first thing that happens when you run a program is to save all the files in the solution and try to compile them. At compile time--whether it is run or build--if there is an error, the IDE displays the error in the Error list without running the program.