I was reading this article because I wanted to understand the usefulness of class of [ClassName]
and I have seen that they declare a virtual constructor. So I have made a test that you can see here:
I understand (from that article) that virtual constructors are useful when I don't know at compile-time the class I want to construct and I can use the class of
. In the code I have shown above, what is the difference?
If I declared TFirst constructor as virtual without overriding TSecond I'll get the warning of course ad I can remove that with a reintroduce or override. But isn't the constructor automatically overridden (look at the code on the left)? I think that they are equivalet.