Home > Net >  I want Get Is Equal operator in VB.net
I want Get Is Equal operator in VB.net

Time:10-17

I want Get Is Equal operator in VB.net like in Java (A==B), I tried this, but the results are not true, What is the reason for that?

    Sub Main()
        Console.WriteLine((100 <> 100) And False)

    End Sub
End Module 


CodePudding user response:

If I understand it correctly, you want an equality comparison.

On VB.net the equality operator is just =

Therefore False = False returns True

Based on your example Console.WriteLine((100 <> 100) = False) should result in True

For reference: Comparison operators on VB.net

  • Related