obtain a reference to a derived form in its base form

  • Thread starter Thread starter Daniel
  • Start date Start date
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
 
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.
 
Back
Top