Part 9 Call an abstract method from an abstract class constructor

Link for code samples used in the demo
http://csharp-video-tutorials.blogspot.com/2013/10/part-9-call-abstract-method-from.html

Link for csharp, asp.net, ado.net, dotnet basics, mvc and sql server video tutorial playlists
http://www.youtube.com/user/kudvenkat/playlists

Can you call an abstract method from an abstract class constructor? If so, what is the use of it?
Yes, an abstract method can be called from an abstract class constructor. Here is an example.
public class Program
{
public static void Main()
{
CorporateCustomer CC = new CorporateCustomer();
SavingsCustomer SC = new SavingsCustomer();
}
}

public abstract class Customer
{
protected Customer()
{
Print();
}

public abstract void Print();
}

public class CorporateCustomer : Customer
{
public override void Print()
{
Console.WriteLine(“CorporateCustomer Print() method implementation called”);
}
}

public class SavingsCustomer : Customer
{
public override void Print()
{
Console.WriteLine(“SavingsCustomer Print() method implementation called”);
}
}

An abstract method in an abstract class does not have any implementation, so what is the use of calling it from the abstract class constructor?
If you want the abstract method to be invoked automatically whenever an instance of the class that is derived from the abstract class is created, then we would call it in the constructor of the abstract class.

    .Net abstract abstract class advantage Advantages array arraylist AS asp.net benefits block C (Programming Language) C# c# class default constructor access modifier c# interview questions and answers c# reflection constructor access modifier c# reflection constructor not found c# reflection default constructor c# reflection get constructor c# reflection private constructor c# reflection protected constructor call cast catch class constructor csharp Data DataTypes difference between Difference between int and Int32 in c# different directory dot net dotnet Each example exception exceptions factorial files Finally folder frequently asked function generic Handle happens int vs int32 interfaces interview is jagged keyword LINQ list Lists method Number occur Operator Overriding purpose question questions Real Real-time real-world realtime Recursion recursive reverse Sentence single store String Structure subdirectories Throw throws time try Types Use using virtual method what when where Why Word World