If ElseIf Else End If Demo
Imports System
Public Class MainClass
Shared Sub Main()
'Declare and set a variable
Dim intNumber As Integer = 27
If intNumber = 1000 Then
System.Console.WriteLine("'intNumber' is, indeed, 1000!")
ElseIf intNumber = 27 Then
System.Console.WriteLine("'intNumber' is 27!")
Else
System.Console.WriteLine("'intNumber' is not 1000!")
End If
End Sub
End Class
Related examples in the same category