Lecture-05 Decision Making With Control Statement
Lecture-05 Decision Making With Control Statement
9. Double-click the Sign In button The Button1_Click event procedure appears in the Code Editor
10. Type the following program statements in the event procedure:
If (MaskedTextBox1.Text = "555-55-1212" )
MessageBox.Show("Welcome to the system!") ;
Else
MessageBox.Show("I don't recognize this number") ;
The Switch Decision
Structures
A Switch Statement is similar to an If . . .. . ElseIf structure,
but it’s more efficient when the branching depends on one key
variable, or test case You can also use Select Switch structures
to make your program code more readable.
Syntax of select case statements
Questions?