Mega Code Archive

 
Categories / VB.Net Tutorial / Statements
 

ElseIf

public class Test    public Shared Sub Main         Dim intScore As Integer         Dim strResult As String         intScore = 78         If intScore < 50 Then             strResult = "Failed."         ElseIf intScore < 75 Then             strResult = "Pass."         ElseIf intScore < 90 Then             strResult = "Very Good."         Else             strResult = "Excellent."         End If         Console.WriteLine(strResult)    End Sub End class Very Good.