Why does C# allow abstract class with no abstract members?

Posted by fatcat1111 on Stack Overflow See other posts from Stack Overflow or by fatcat1111
Published on 2010-06-08T18:00:26Z Indexed on 2010/06/08 18:42 UTC
Read the original article Hit count: 261

Filed under:
|
|

The C# spec, section 10.1.1.1, states:

An abstract class is permitted (but not required) to contain abstract members.

This allows me to create classes like this:

public abstract class A
{
    public void Main() 
    {
        // it's full of logic!
    }
}

This is really a concrete class; it's only abstract in so far as one can't instantiate it. If inheritors don't actually have to provide implementation, then why call it abstract?

© Stack Overflow or respective owner

Related posts about c#

Related posts about language-design