EventHandler outside of class

D

Dunster

Hi,

Is it possible to get an EventHandler to be called outside of the class
where a control is instantiated?

For example, I would like to create a button at runtime and have it call a
function in another class if it is clicked.

Any hints would be greatly appreciated

Thanks

Dunster
 
D

Dunster

Lucean Morningside wrote:

Thank you for taking the time to reply and especially the sample code.

When you talk about design patterns, where can I learn more about these? Are
you talking about books that are dedicated to design patterns? I'm quite
new to C# but have coded extensively in C but of course C# is object
oriented and quite a bit different.

TIA for any info on design patterns.

Dunster
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top