G
Guest
Hi!
I have a strange experience with coding in vb.net 2003. Steeping through the
following code:
Me.optWarmWaterByAmount.Checked = True
Me.optWarmWaterByPercent.Checked = False
Me.WarmWaterCosts.Text = ""
Me.WarmWaterPercent.Text = ""
If Me.optWarmWaterByAmount.Checked Then Me.WarmWaterCosts.Text =
Me.WarmWaterValue.Text
If Me.optWarmWaterByPercent.Checked Then Me.WarmWaterPercent.Text =
Me.WarmWaterValue.Text
the debugger shows as if the instruction in the second IF statement would be
executed (the yellow shadow covers that instruction as an execution step),
however (luckily) it doesn't really do it.
Making a whole-type IF statements with the closing End If for both of the
conditional statement shows the execution path correctly.
Interesting, isn't it. I've made a google search but found nothing. Is it a
known problem, which occurs sometimes, or just a rare surprise for me?
Best regards,
SlowArrow.
I have a strange experience with coding in vb.net 2003. Steeping through the
following code:
Me.optWarmWaterByAmount.Checked = True
Me.optWarmWaterByPercent.Checked = False
Me.WarmWaterCosts.Text = ""
Me.WarmWaterPercent.Text = ""
If Me.optWarmWaterByAmount.Checked Then Me.WarmWaterCosts.Text =
Me.WarmWaterValue.Text
If Me.optWarmWaterByPercent.Checked Then Me.WarmWaterPercent.Text =
Me.WarmWaterValue.Text
the debugger shows as if the instruction in the second IF statement would be
executed (the yellow shadow covers that instruction as an execution step),
however (luckily) it doesn't really do it.
Making a whole-type IF statements with the closing End If for both of the
conditional statement shows the execution path correctly.
Interesting, isn't it. I've made a google search but found nothing. Is it a
known problem, which occurs sometimes, or just a rare surprise for me?
Best regards,
SlowArrow.