Wednesday, 7 August 2013

Why define C# abstract classes without abstract members

Why define C# abstract classes without abstract members

am familiar with abstract classes, interfaces, and the like.
What is not clear to me is why anyone would create a C# abstract class
that does not have abstract members? (the C# compiler allows this).
Example:
public abstract class House
{
public void OpenDoor()
{
Console.WriteLine("Door opens");
}
}

No comments:

Post a Comment