Author Archives: Dudi Keleti

Mono.Cecil – Generics

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<> Advertisements

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

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:

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

Make method static with Roslyn

Before Roslyn days, this was not easy to do that, like others re factoring. Fortunately we have R# for this. But now it’s not so hard to re factor an instance method into static method. I wrote a rewriter that … Continue reading

Posted in .NET, c#, Roslyn | Tagged , , , , , | Leave a comment

What is the @ sign before a variable name

You probably saw this at least once Or especially in generated code (like if you let R# to do some rewriting for you) you can see So, what is it? the simple answer is the ‘@’ sign can be added … Continue reading

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