Category Archives: C#

Covariance and Contravariance in C#3

A short introduction to Covariance and Contravariance in C# 3 preparing you to an article about that in C# 4. So what is covariance ? Covariance is basically using a method which returns something derived from the expected type. An … Continue reading

Posted in C#, Code | 2 Comments

Combinatory logic from scratch

Cause it’s sooooo sexy, let’s speak about Combinatory Logic ! Rule 1 : You don’t talk about Combinatory Logic Rule 2 : You don’t talk about Combinatory Logic Rule 3 : Combinatory Logic is based on Lambda Calculus (see Wikipedia … Continue reading

Posted in C#, Code | Tagged | 1 Comment

The art of Events

The art of using events to build more independent classes. /* Found a better example */ Imagine you have a class A and a class B. A builds B, and B have to communicate with A (call methods … ?) … Continue reading

Posted in C#, Code | Tagged | Leave a comment

Howto invoke an event via reflection

Why this article ? because of this note found on the msdn’s EventInfo page: “EventInfo is not intended to be used to raise events. An object raises events as dictated by its internal state. ” Let’s try to raise an … Continue reading

Posted in C#, Code | Comments Off on Howto invoke an event via reflection