I am surprised. And works this way in C#, C and C++ so what required
this change in VB .NET?
Thank you both!
Mars.
Simple answer = VB was never based or derived from C/C++, it was based on
BASIC.
The AndAlso and OrElse operators were added in VB.Net 2003 to provide
exactly that 'short-circuiting' behaviour.
>I am surprised. And works this way in C#, C and C++ so what required
> this change in VB .NET?
> Thank you both!
> Mars.
>
> *** Sent via Developersdex http://www.developersdex.com ***
"Victory" <csharp@devdex.com> schrieb:
>I am surprised. And works this way in C#, C and C++ so what required
> this change in VB .NET?
Actually there is no operator named 'and' in C#, C, and C++, respectively.
However, C# has both '&' and '&&' operators, which share semantics with VB's
'And' and 'AndAlso' operators. '|' maps to 'Or' and '||' maps to 'OrElse'.

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Victory - 05 Jan 2008 14:29 GMT