I always seem to see if a string (querystring value usually) has a value but first I have to check that it is not nothing first so I end up with 2 if then statements – am I missing somethign here – there has to be a better way to do this:
If Not String.IsNullOrEmpty(myString) Then If CBool(myString) Then //code End If End If
In VB.Net, And does not short-circuit, but AndAlso does.
(same for Or and OrElse)
So your code should look something like