Re: protected interface members



It sounds like you want an abstract class more than an interface.
There's no reason you can't delcare something 'protected abstract' in
your base class.

Is there a reason you need to have an interface over an abstract class?

HTH
Andy

.



Relevant Pages

  • Re: Abstract class or interface?
    ... I try to make the decision based on the relationship of the derived class to the base class. ... If the derived class "can act like" the type of the base class, I'd lean towards an interface. ... I understand the abstract class can have implementation in its methods and derived classes can only inherit one abstract class. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Abstract Base Classes vs Interfaces?
    ... an abstract class is the only choice. ... You can take any class and derive from it adding in an interface ... > doesn't have to be derived from any particular base class. ... I think ICollection is a good example of the ambiguity between ...
    (microsoft.public.dotnet.languages.vb)
  • Re: oops questions c#
    ... classes.My base class cannot be a abstract class. ... explicitly implement an interface for all derived classes. ... Working on the assumption it is legit, a simple solution would be to mark the method as virtual in the base class and have it throw a NotImplementedException. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Abstract class or interface?
    ... The simplest way to look at this is to understand that an interface is ... special case of an abstract class, ... only supports single inheritance of implementation and multiple ... implementations to the base class without breaking existing clients of ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: interface implementation and inheritance.
    ... then yes...I don't see any reason what you posted ... wouldn't compile. ... interface in base class and half in derived class. ... Class A (base class) and half in Class B. ...
    (microsoft.public.dotnet.languages.csharp)