P
Peter
Hi,
I have two different methods that need to be executed when one event is
raised. The general way I've done this is to attach the same handle to both
methods, as follows.
Public Sub Method1 (ByVal sender as Object, ByVal e as EventArgs) Handles
Control.Event1
'code
End Sub
Public Sub Method2 (ByVal sender as Object, ByVal e as EventArgs) Handles
Control.Event1
'code
End Sub
But I need to ensure that Method1 is executed before Method2. How can I do
this? I thought that changing their order in code would work --- and it did
in one instance --- but in another, Method2 is executed first. How does
VB.NET decide what order it does these things in?
I have two different methods that need to be executed when one event is
raised. The general way I've done this is to attach the same handle to both
methods, as follows.
Public Sub Method1 (ByVal sender as Object, ByVal e as EventArgs) Handles
Control.Event1
'code
End Sub
Public Sub Method2 (ByVal sender as Object, ByVal e as EventArgs) Handles
Control.Event1
'code
End Sub
But I need to ensure that Method1 is executed before Method2. How can I do
this? I thought that changing their order in code would work --- and it did
in one instance --- but in another, Method2 is executed first. How does
VB.NET decide what order it does these things in?