Tag Archives: msil

Value type methods – call, callvirt, constrained and hidden boxing

Long time ago I wrote a post here on  call vs callvirt and the needed of the this null check. Here I want to wrote about this topic but on value types. Look on these three ToString() calls: Advertisements

Posted in .NET, c#, Roslyn | Tagged , , , , , , , | 4 Comments

IL Call Vs. Callvirt Instruction Part Two

In the first part I wrote about what is call and callvirt, what the differences and why should I care. We saw that even non-virtual methods called via callvirt instruction because the null check reason. But with this sense when this is … Continue reading

Posted in .NET | Tagged , , , , , , | Leave a comment

IL Call Vs. Callvirt Instruction

.NET languages compiles to IL code (aka msil or cil) The IL code contains instructions that in run time the jit compiler translate it to machine code. In this post I want to talk about method call instructions. When we writing … Continue reading

Posted in .NET | Tagged , , , , , , | 6 Comments