Monthly Archives: May 2010

C# Delegate Covariance and Contra-variance

Covariance allows us to have a more derived type as return type Contra-variance allows us to have less derived type as parameter type than what is specified in the delegate. Example: using System; using System.Collections.Generic; public class MyBase { public … Continue reading

Posted in Development | Leave a comment

C# Anonymous Methods and Lambda Expressions

In the following example talks about anonymous methods, method group conversions and finally lambda expressions. using System; using System.Collections.Generic; public class CarEventArgs : EventArgs { public string Msg { get; set; } public CarEventArgs(string msg) { Msg = msg; } … Continue reading

Posted in Development, Uncategorized | Tagged | Leave a comment