Tag Archives: .Net

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

Convert linq query syntax to fluent syntax with Roslyn

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 , , , , , , | 1 Comment

Low-Level Global Keyboard Hook in C#

I had to implement a mechanism for a global low-level keyboard hook. After a brief search on the internet, I understood the principle and I went out with a solution in hand. First I show you how to use it, it’s very simple. To register a … Continue reading

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