Hacker News new | ask | show | jobs
by microtonal 4839 days ago
- A class can only inherit from one abstract class, but can implement multiple interfaces.

- An interface cannot have member variables.

1 comments

Also, an abstract class can have a constructor (and instance initializers, and initialization expressions for its fields), which an interface can't. That means an abstract class can do work when it is created.

Although it's probably a good idea not to do too much work - a factory method would be better for that.