Category Archives: Roslyn

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 , , , , , , , | Leave a comment

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

Convert linq query syntax to fluent syntax

In c# you can write LINQ queries in two ways. One is the fluent invocation syntax (extension method) and the other is query comprehension syntax. Fluent example: Comprehension example: I was needed the ability to take the comprehension syntax and … Continue reading

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