Abstract class / interface?

  • Thread starter Thread starter Guest
  • Start date Start date
Beeeeeeeeeeeves said:
What's the difference between the two? Any?

Abstract classes can contain code - in other words, not all its methods
need to be abstract. A class can implement multiple interfaces, but
only derive from one class, which may be abstract. Abstract classes can
also contain fields etc - interfaces can (IIRC) only contain method and
property declarations.
 
nice one.

Jon Skeet said:
Abstract classes can contain code - in other words, not all its methods
need to be abstract. A class can implement multiple interfaces, but
only derive from one class, which may be abstract. Abstract classes can
also contain fields etc - interfaces can (IIRC) only contain method and
property declarations.
 

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

Back
Top