Tuesday 27 September 2016

Understand Concrete Class in dot net

Concrete class is nothing but normal class, we can use as a base class or may not.Not compulsory, it can't contain abstract methods.we can create object and work with this class.

A concrete class is used to define a useful object that can be instantiated as an automatic variable on the program stack.The implementation of a concrete class is defined. The concrete class is not intended to be a base class and no attempt to minimize dependency on other classes in the implementation or behavior of the class..

class Sample
public void MyMethod()

Concrete class 
1. we can create instance as well as we can inherit.
2. No method should be abstract.
3. In application class hierarchy, concrete class need not be in the first level.

Abstract class 
1. We can not instantiate but we can inherit.
2. At least one method should be abstract.
3.In application class hierarchy, abstract class can be at the first level.