Object header, sync block, thin lock vs fat lock, hashcode – all of this and more will be explained in the following post. First, let’s make a brief overview on the object header in the CLR. What is the object … Continue reading
Posted in .NET, c#
Tagged Behind the scenes, c#, clr, coreclr, fat lock, gc, hashcode, internal, lock, object header, syncblock, synchronization, thin lock
The second “Behind the scenes” article, will be about local function. This is much simple from previous post about yield keyword. In short, local function translated to a method of the class. Example 1
The first “Behind the scenes” article will be about yield keyword. Lets take for example a very simple code that return numbers 1,2,3: The compiler translates this 4 lines code into an entire class.
I see a lot of beginners programmers, but certainly not just beginners, who are not sure how things work in C#. I’m not talking about the CLR but about the language itself. And mostly specific on all sorts of keywords … Continue reading
You may have seen it, but what does it actually do? Do I need to add them? When we write IL macros, we emit instruction after instruction to the method body. Instruction, is operation to do (e.g. math operations, load\store, … Continue reading
One of the important thing you need to know when you start to do real work with Cecil is the IAssemblyResolver The role of this interface, is to handle module resolving.
Till now we saw an overview on Cecil and two simple examples. Today I want to show how you can handle generics in Cecil. For the example I’m going to use EqualityComparer<>