J
Just_a_fan
Both of the Dim statements work in the following. Is there a preference
and why? (Of course, you would not use them both but each, by itself,
works and enables the Invoke to function properly)
Dim newDelegate As New UIDelegate(AddressOf StatusAdd)
Dim newDelegate As UIDelegate = AddressOf StatusAdd
lblStatus.Invoke(newDelegate)
And a follow-on topic:
Actually, this brings up the whole subject of "New". It is something
new to me and I would like to know if there is something written up
explaining about why one uses "New", when it should be used and any
other implications of using it. Coming from VB6, this is foreign to me.
If there is something already written up, then that's great but I don't
know how to find something this esoteric and general. The functional
helps tell "what" but rarely "why".
Thanks for any pointers. I have been wondering about "New" for a while
and the example, above, really pointedly makes me want to know about
this syntax element.
Mike
and why? (Of course, you would not use them both but each, by itself,
works and enables the Invoke to function properly)
Dim newDelegate As New UIDelegate(AddressOf StatusAdd)
Dim newDelegate As UIDelegate = AddressOf StatusAdd
lblStatus.Invoke(newDelegate)
And a follow-on topic:
Actually, this brings up the whole subject of "New". It is something
new to me and I would like to know if there is something written up
explaining about why one uses "New", when it should be used and any
other implications of using it. Coming from VB6, this is foreign to me.
If there is something already written up, then that's great but I don't
know how to find something this esoteric and general. The functional
helps tell "what" but rarely "why".
Thanks for any pointers. I have been wondering about "New" for a while
and the example, above, really pointedly makes me want to know about
this syntax element.
Mike