Thursday 11 April 2013

Question: Is it possible to have Virtual Constructor? If yes, how? If not, Why not possible ?


Question: Is it possible to have Virtual Constructor? If yes, how? If not, Why not possible ?

 Answer: Virtual Constructor doesn't exist.

Constructor can’t be virtual as the constructor is a code which is responsible for creating a instance of a class and it can’t be delegated to any other object by virtual keyword means.

No comments:

Post a Comment