Inherits AND Implements

  • Thread starter Thread starter Mike Labosh
  • Start date Start date
M

Mike Labosh

namespace Foo {

public interface IDoStuff {
// method declarations
}

public abstract class Fee {
// abstract methods for the subclasses to inherit
}

public class Fum {
// Needs to inherit from Foo.Fee class
// Needs to implement Foo.IDoStuff interface
// but I can't seem to phrase this class's declaration correctly
}
}

It's late, and my brain is overloaded. How should I declare the Foo.Fum
class?
 
Mike said:
namespace Foo {

public interface IDoStuff {
// method declarations
}

public abstract class Fee {
// abstract methods for the subclasses to inherit
}

public class Fum {
// Needs to inherit from Foo.Fee class
// Needs to implement Foo.IDoStuff interface
// but I can't seem to phrase this class's declaration correctly
}
}

It's late, and my brain is overloaded. How should I declare the Foo.Fum
class?

public class Fum : Fee, IDoStuff
 
Mike Labosh said:
namespace Foo {

public interface IDoStuff {
// method declarations
}

public abstract class Fee {
// abstract methods for the subclasses to inherit
}

public class Fum {
// Needs to inherit from Foo.Fee class
// Needs to implement Foo.IDoStuff interface
// but I can't seem to phrase this class's declaration correctly
}
}

It's late, and my brain is overloaded. How should I declare the Foo.Fum
class?

public class Fum : Fee, IDoStuff
{

}
 
public class Fum : Fee, IDoStuff

OMG! I can't believe it's that simple. YOU RULE! THANK YOU!
 
Back
Top