Relation operator: less, bigger : Operator Logic « Language Basics « VB.Net






Relation operator: less, bigger

Relation operator: less, bigger
Imports System

Public Class MainClass
    Shared Sub Main()
        Dim intNumber As Integer

        intNumber = 20

        'Is intNumber less than or equal to 27?
        If intNumber <= 27 Then
            System.Console.WriteLine("Is 'intNumber' less than or equal to 27? Yes!")
        Else
            System.Console.WriteLine("Is 'intNumber' less than or equal to 27? No!")
        End If

        'Is intNumber greater than 27?
        If intNumber > 27 Then
            System.Console.WriteLine("Is 'intNumber' greater than 27? Yes!")
        Else
            System.Console.WriteLine("Is 'intNumber' greater than 27? No!")
        End If

        'Is intNumber greater than or equal to 27?
        If intNumber >= 27 Then
            System.Console.WriteLine("Is 'intNumber' greater than or equal to 27? Yes!")
        Else
            System.Console.WriteLine("Is 'intNumber' greater than or equal to 27? No!")
        End If
    End Sub
End Class

           
       








Related examples in the same category

1.And, Or, Xor and Not OperatorAnd, Or, Xor and Not Operator
2.Compare Integer ValueCompare Integer Value