In this article we will learn about delegates with examples in C#.
When I first heard this word lambda I was in my sixth or seventh standard (well in reality I don't remember when so that is approximate). It was a relative Mathematics term. Then I got older (not that much) then I began to learn programming. I was learning C# and I heard lambda again. Now how the hell is lambda relevant to programming? I decided to learn about it so here is my journey to lambda. Part 1: Delegates It all starts when Microsoft decided to put delegates in C#. Well some of you might remember function pointers in C++ classes. Microsoft decided to use the same functionality as delegates (well actually delegates do much more then that).
Here the implementation says that I can write to the screen as well as on the file and the database at the same time. Plus I get one more benefit since all the code is in 2 functions, I can easily modify them and it will not affect the other code instead of creating a long method that can be difficult to maintain (you see I am handling a difficult database, doing file handling and console writing operations, just kidding!)Our story will continue. Until the next part, au revoir.
New Features in C# 6.0