VB.Net Tutorial/Operator/Relational Operators
Версия от 16:40, 26 мая 2010; (обсуждение)
Using equality and relational operators.
Module Tester
Sub Main()
Dim number1, number2 As Integer
number1 = 10
number2 = 20
If number1 = number2 Then
Console.WriteLine("{0} = {1}", number1, number2)
End If
If number1 <> number2 Then
Console.WriteLine("{0} <> {1}", number1, number2)
End If
If number1 < number2 Then
Console.WriteLine("{0} < {1}", number1, number2)
End If
If number1 > number2 Then
Console.WriteLine("{0} > {1}", number1, number2)
End If
If number1 <= number2 Then
Console.WriteLine("{0} <= {1}", number1, number2)
End If
If number1 >= number2 Then
Console.WriteLine("{0} >= {1}", number1, number2)
End If
End Sub
End Module
10 <> 20 10 < 20 10 <= 20