5
Reply

what is virtual constructor?

Lalit Raghav

Lalit Raghav

8y
1.5k
0
Reply

    no, a class cannot have a virtual constructor.It doesn't make sense to have a virtual constructor. The order in which objects are constructed in C# is by constructing derived classes first, so the derived constructor is always called since the class you want to call is well known at the time of construction.

    Constructors cannot be virtual. Declaring a constructor as a virtual function is a syntax error.

    Constructors cannot be virtual. Declaring a constructor as a virtual function is a syntax error.

    c# does contains virtual constructor.

    Constructors cannot be virtual. Declaring a constructor as a virtual function is a syntax error.