obtain a reference to a derived form in its base form

D

Daniel

Hi,

I need to catch an exception (same exception) in many forms (tens+) derived
from a base form; so I thought to make 2 methods in the base form that
should handle the exception;
the problem is that the code must set some properties in a mdi form, derived
from the base form;
now, how can I get a reference, of any kind, to that derived form in its
base form?

Thank you,
Daniel
 
G

Girish bharadwaj

if its within a virtual method, you can just use the *this* in C# or *Me* in
VB to get to the derived form.
You might want to look into "Template method" pattern. Search the web for
that.
 

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