java - Why C# implements methods as non-virtual by default? -


Unlike Java, why cure C + by default as a non-virtual function? Is it more likely to have a performance problem rather than other possible outcomes?

I have reminded me to read a paragraph from Anders Hejelsberg, many benefits are coming out about the existing architecture. But, what about side effects? Is it really non-virtual methods to stop good business by default?

Classes designed to be able to take advantage of it . By default, the methods of virtual mean that every function in the classroom can be plugged and replaced by another, which is not really good. Many people also believe that Classes should be sealed originally.

Virtual system can have some effect in the code. Although the primary reason is not likely to be.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -