I just don't understand a few things about error handling.... for example...
Why does the following raise an error in a button_click event and not on a form_load event (in the form load event all lines that occur after the erroneous line are not evaluated):
(btw I know that an error is raised if i put a try / catch round it ... the above... but why does it act differently if i don't?)
And why does doing the same code (above) in a button click in another of my applications not cause an error to raise and close the form?Code:Dim x As Integer = 22 Dim asd As Integer = x / 0
Thanks in advance
Kris




Code Project - "Best VB.NET article of October 2011"
on the left <--)
Reply With Quote