+ 8
Constructor
Why a constructor cant be virtual?
9 Respostas
+ 3
if a class has a constructor it has to be able to build an Instance of that class. If it was virtually all the sub classes of that class would have to implement it but the class itself would fail to be able to produce an object. Therefore if a base class has a constructor, it cannot be virtual
+ 7
1.'Virtual' can be used for methods called on objects, but constructor is used to create an object.
2.You cannot override base class constructor in derived class, so making constructor virtual is pointless.
3.Constructor cannot be virtual, but destructor can.
+ 5
I think it's just spam
0
Aleksander Szczepura tnx tnx :)
0
labas
0
Emilija Radvilate what is that ? :/
0
Здравствуте меня завот Алекс
- 1
Здарова пиндосы, как жизнь?
- 2
Zdarova pindosi kak zizn