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

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

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 solution in hand. First I show you how to use it, it’s very simple. To register … Continue reading

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