Event publish and subscribe example


Example of event publish and subscribe

 Read more of this post



// C# non-generic version
public delegate void EventHandler(Object sender,EventArgs e)

// C# 2.0:  Generic version
public delegate void EventHandler<TEventArgs>(Object sender, TEventArgs e)

Read more of this post

The evolution of delegate creation from C# 1.0 to C# 3.0



In C# 1.0, you created an instance of a delegate by explicitly initializing it with a method that was defined elsewhere in the code. C# 2.0 introduced the concept of anonymous methods as a way to write unnamed inline statement blocks that can be executed in a delegate invocation. C# 3.0 introduced lambda expressions, which are similar in concept to anonymous methods but more expressive and concise.

Read more of this post

IEnumerable vs. IQueryable


Below lists the differences between them based on their properties :

Read more of this post