4 ms·
It also just happens that the MS C# compiler always emits the `callvirt` instruction for instance methods, because the language spec requires that a NullReferen
by noblethrasher 10y ago
It also just happens that the MS C# compiler always emits the `callvirt` instruction for instance methods, because the language spec requires that a NullReferenceException be thrown any time a method is called on a null instance, even if none of the instance fields are used in the method.
Source: https://blogs.msdn.microsoft.com/ericgu/2008/07/02/why-does-c-always-use-callvirt/ https://blogs.msdn.microsoft.com/ericgu/2008/07/02/why-does-...