What is difference between And and Andalso in VB.net ?
The 'And' operator evaluate both side, where 'AndAlso' only evaluate the right side if the left side is true. An example:
If mystring IsNot Nothing And mystring.Contains("Foo") Then
' bla bla
End If
This throws an exception if mystring = Nothing
If mystring IsNot Nothing AndAlso mystring.Contains("Foo") Then
' bla bla
End If
This don't.
So if you come from the C# world, you should use AndAlso which is more like &&.