Method overloads resolution and Jon Skeet's Brain Teasers

前端 未结 5 1536
無奈伤痛
無奈伤痛 2020-12-13 06:45

Jon\'s Brain Teasers

Here Be Spoilers...

I\'m looking at the answer to #1, and I must admit I never knew this was the case in overload resol

5条回答
  •  庸人自扰
    2020-12-13 07:34

    the reason is: performance. calling a virtual method takes a bit more time. calling a delegate on a virtual method takes much more time and so on....

    see: The cost of method calls

提交回复
热议问题