interface IFoo
{
void Bar()
}
We then create an abstract version of IFoo; BaseFoo:
abstract class BaseFoo : IFoo
{
}
This would compile and work no problemo in Java.
Does it work in C#?
Nope!
C# forces you to implement methods from Interfaces in abstract classes regardless of wether or not your abstract class actually needs to implement them.
So what is the solution to this problem:
abstract class BaseFoo : IFoo
{
public abstract void Bar();
}
Pretty neat huh?
No comments:
Post a Comment