inheriting from a base class and using an interface

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

I have a class which is implementing an interface, but I also want to have
it inherit from a base class. Can you do both with a class? If so, what's
the syntax?

thanks.
 
public class NewClass : theBase, theInterface
{
//code
}


: I have a class which is implementing an interface, but I also want
to have
: it inherit from a base class. Can you do both with a class? If so,
what's
: the syntax?
:
: thanks.
:
:
 
Mark,
In addition to Chris's example, you can actually implement multiple
interfaces, but inherit from only one base class.

public class NewClass : theBase, theFirstInterface, theSecondInterface
{
//code
}

Hope this helps
Jay
 
Back
Top