First of all - if you surround your code with "" then people will respond quicker.
OK, thanks.Secondly,
in an if statement you follow this line of resaoning
if condition is met then perform the routine then go directly to "end if" do not pass go and do not collect $200. If the condition isn't met and there is an else, then everything that doesn't meet your condition gets the else. Let's say you can only choose chocolate or vanilla ice cream. It would be
if iceCream = chocolate
give user chocolate (then you head to the end if)
else
give user vanilla (then head to the end if)
end if
Thanks for the explanation, but my problem doesn't lie in understanding how IF-ELSE conditions are executed, but rather in the specific code found in this particular IF-ELSE statement.
According to my understanding, which, mind you, is shaky at best, since I'm a vb.net newb, on the line:
Dim SI As New mySubDelegate(AddressOf mySub)
,
SI is declared as a delegate, pointing to the mySub method. So when it's called on the line:
Me.Invoke(SI, New Object() {Text})
,
it calls the mySub method a second time. This second time, according to my understanding, doesn't need an invoke. So in effect, the mySub() method should be called twice. Once, when an invoke is required causing the IF part to be executed, and once when an invoke is not required, causing the ELSE part to be executed.
What I'd like to find out is why the line:
Me.Invoke(SI, New Object() {Text})
doesn't cause an invoke to not be required, thus causing the ELSE part to be executed.