Page 51 - Programming VB.NET
P. 51
Code With VB .Net 47
Private Sub btncase_Click(sender As
System.Object, e As System.EventArgs) Handles
btnresult.Click
Dim markah As Integer
markah = txtmark.Text
Select Case (markah)
Case 80 To 100
lblgrade.Text = "A"
Case 60 To 79
lblgrade.Text = "B"
Case 50 To 59
lblgrade.Text = "C"
Case 40 To 49
lblgrade.Text = "D"
Case 0 To 39
lblgrade.Text = "FAIL"
Case Else
lblgrade.Text = "WRONG INPUT"
End Select
End Sub