I'm starting to learn C # and I need to develop a program in console mode.
Must have a menu with an option to register a student and another option to show the record of this student.
First I checked the menu and the person must register a student, and the variables will receive the data, after that, in another menu option, should show the data entered.
I used the switch structure, in which case 1 is to register and case 1 to show the records, but the variable that is the case 1 appears as unknown in case 2.
How could solve it, making the variable function in 2 cases?
Must have a menu with an option to register a student and another option to show the record of this student.
First I checked the menu and the person must register a student, and the variables will receive the data, after that, in another menu option, should show the data entered.
I used the switch structure, in which case 1 is to register and case 1 to show the records, but the variable that is the case 1 appears as unknown in case 2.
How could solve it, making the variable function in 2 cases?