Hi again,
I've been coding in vb .Net on my most recent project and during a debug
session I noticed that VB .Net hasn't got lazy evaluation... WHY?! I love
lazy evaluation and actually count on it.
In my current application there is data that may or may not exist depending
on a certain value. It's a set of rules that may or may not apply.
At a certain time in the code, there is the following (alike anyhow) statment.
If ((objectA.HasRu le4 AND objectB.FailsRu le4(params))
OR (objectA.HasRul e5 AND objectB.FailsRu le5(otherparams ))
OR (not objectA.Propert y.Value.equals( objectB.Propert y.Value)) then
collectionOfObj ectB.Remove(obj ectB)
else
objectB.Calcula tespecialfield( )
end if
When I write this code I expect the run to check on objectA.Hasrule 4 if that
is false it should move on to the next or-statement.
Is there any possibility to tell VB .Net (or rather VS 2003) to apply lazy
evaluation for conditional statements?
As usual many thanks in advance, and enjoy your holidays :)