inherit a form

  • Thread starter Thread starter juli
  • Start date Start date
J

juli

I am trying to make an instance of a form in another form after
inhereting it (with :) but it's not working,I can't see the class.Why
and how can I do it?
Another question,
If I have 2 classes I want to inherit what is the syntax: a:b,c is not
working.How to do it?
Thanks !
 
juli,
If you inherit from a class, you do not need to make an instance of it
in the derived class. When you create the object of the derived class, it
has all the public and protected properties/methods of the inherited class.
Also, internally, the base class is instantiated anyway when the derived
class is instantiated. So you can use all methods of the inherited class as
if they were in the derived object (use this. to find out).

You cannot derive a class from 2 different classes in c#. Multiple
inheritance is not permitted in C#. You can implement 2 (or more) interfaces
though, but i dont think thats what you are looking for

Ranjan
 
Back
Top