An easy operator question

  • Thread starter Thread starter Morten Snedker
  • Start date Start date
M

Morten Snedker

Is there a smarter .NET way of doing the logical operation

If i > 0 And i < 6 Then

- or is that it?

Regards /Snedker
 
There's a slightly smarter way, using short-circuiting:
If i > 0 AndAlso i < 6 Then

--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C#/VB to C++ converter
Instant Python: C#/VB to Python converter
 
I'm not a SQL expert by any means, but I think SQL has its own complex
short-circuiting scheme. It goes beyond simple short-circuiting and has many
rules to determine which conditions get evaluated and in what order.
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C#/VB to C++ converter
Instant Python: C#/VB to Python converter
 
Back
Top