Si. Puis. Autrement pourrait �tre tr�s malpropre, si vous avez beaucoup de rapports conditionnels. Il vaut mieux d'employer le point de droit choisi pour des rapports conditionnels multiples.
Le format est :
Select Case expression
Case value1
Block of one or more VB statements
Case value2
Block of one or more VB Statements
Case value3
Block of one or more VB statements
Case value4
.
.
.
Case Else
Block of one or more VB Statements
End Select
L'exemple donn� ci-dessous montre l'utilisation du rapport choisi de cas dans VB
' Examination Grades
Dim grade As String
Private Sub Compute_Click( )
grade=txtgrade.Text
Select Case grade
Case "A"
result.Caption="High Distinction"
Case "A-"
result.Caption="Distinction"
Case "B"
result.Caption="Credit"
Case "C"
result.Caption="Pass"
Case Else
result.Caption="Fail"
End Select
Keywords:
More on Program Control in vb,
visual basic control,
source code control,
vb source code,
visual basic vb,
visual basic net control,
vb sample code,
asp net control,
vb asp net,
vb tutorials,
vb timer,
vb array,
vb code,
vb msgbox,
vb dim,
vb byval,
vb treeview