btnProcessData_Click(this
As seen above we simply pass the arguments "this" and "new EventArgs()" to the _Click function.
One could argue that it would be just as easy to to call a function from both locations such as ProcessData() instead of clicking the button programmatically, but the advantage is if a programmer in the future (or even you down the road) adds logic to the _Click event, it wont be implemented in the triggered event (an event you or the new programmer may not remember or know occurs).
In my opinion, ensuring that a function call is ensured to act EXACTLY like if the button was clicked by the user. A very useful feature I have used many times.
Hi matthewstevenkelly,
I agree with most of aikimark's comments, except I am not sure what (6) means. aikimark can you clarify?
I'd like to see a little more "context", maybe a snippet. There is room in the article for a little more content, as it is well below the recommended minimum of 300 words (171 words by my count). I know this is a Tip/Trick, but you have 125 words to play with just to reach the minium word count, while still retaining the brevity of a Tip/Trick. You can use those words to address some of aikimark's comments as well, such as giving a bit of a sample, perhaps?
Thanks,
mrjoltcola
Experts Exchange Page Editor