Delegate and Event in C# (An introduction for new .NET Developers)

Delegate and Event in C# (An introduction for new .NET Developers)

Delegate and Event in C# (An introduction for new .NET Developers). Delegate and event are two fundamental concepts in C#. Delegate especially is an extremely critical feature of .NET and is used widely in different language features. I will first start with defining delegate, then transition to use out of box delegates Action and Func. And the transition to lambda expressions. And finally using events.

Delegate and event are two fundamental concepts in C#. Delegate especially is an extremely critical feature of .NET and is used widely in different language features.

Delegate is a type in C#. It represents a reference to a method (like a function pointer). And delegates are mainly used for callbacks.

Event on the other hand is used to attach a callback which will be called due to a trigger. The event keyword is used to declare the event in C#.

In this video, I will first start with defining delegate, then transition to use out of box delegates Action and Func. And the transition to lambda expressions. And finally using events.

At 12:23 I said anonymous type, what I meant is an anonymous function. At 15:27 I said the name of the delegate, what I meant is the name of the event.

The URL for my GitHub repo is here: https://github.com/choudhurynirjhar

csharp programming dotnet developer

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

How long does it take to develop/build an app?

This article covers A-Z about the mobile and web app development process and answers your question on how long does it take to develop/build an app.

Developer Career Path: To Become a Team Lead or Stay a Developer?

For a developer, becoming a team leader can be a trap or open up opportunities for creating software. Two years ago, when I was a developer, ... by Oleg Sklyarov, Fullstack Developer at Skyeng company

Tracking a Developer’s Journey From Documentation Visit

Measuring website activity provides only half the story. See how to best track the developer's journey and what funnel stages makes sense for API-first products

IDO Development | Initial DEX Offering Development | IDO Development Platform

The IDO development platform is the new trendsetter in the blockchain world. Investors can make their investments worthy by exploring the benefits of Initial DEX Offering tokens since their value is soaring high in the marketplace.

Offshore Software Development - Best Practices

To make the most out of the benefits of offshore software development, you should understand the crucial factors that affect offshore development.