Compare Integer value and output their relation
Imports System
public class MainClass
Shared Sub Main()
Dim valueOne As Integer = 10
Dim valueTwo As Integer = 20
Dim valueThree As Integer = 30
Console.WriteLine("Testing valueOne against valueTwo...")
If valueOne > valueTwo Then
Console.WriteLine( _
"ValueOne: {0} larger than ValueTwo: {1}", _
valueOne, valueTwo)
End If
Console.WriteLine("Testing valueThree against valueTwo...")
If valueThree > valueTwo Then
Console.WriteLine( _
"ValueThree: {0} larger than ValueTwo: {1}", _
valueThree, valueTwo)
End If
Console.WriteLine("Testing is valueTwo > 15 (one line)...")
If valueTwo > 15 Then Console.WriteLine("Yes it is")
End Sub
End Class
Related examples in the same category