Delegates are very useful in C#, but the concept behind delegates might be hard to fully understand, therefore can be confusing for a lot of C# developers.
It is inevitable for a C# developer to notice the scenarios while coding, when the use of a delegate could come in very handy. I will be your guide through your delegate learning path, and make it simple for you to understand through my logically built examples.
This is my first course, which gives an introduction to the C# delegates.
Delegates are very useful in C#, but the concept behind delegates might be hard to fully understand, therefore can be confusing for a lot of C# developers.
It is inevitable for a C# developer to notice the scenarios while coding, when the use of a delegate could come in very handy. I will be your guide through your delegate learning path, and make it simple for you to understand through my logically built examples.
This is my first course, which gives an introduction to the C# delegates.
If you follow along, you will understand the delegate related topics much easier: Events, Lambda expressions, LINQ. Anonymous methods, Events, and Lambdas will be also covered in the future sections of this course.
LINQ can make your C# code more powerful, and simpler, because it gives you an easy and concise way to query objects. But in order to use it, you first need to understand how delegates work.
Why should you take this course instead of watching Youtube videos about delegates?
What will you learn in this course?
Why should every C# developer be familiar with the concept of delegates?
You will learn what a delegate is, how it can be declared, instantiated, explained through my slides
You can now start coding with me, and see how a custom delegate is used in code
We assume that we got new requirements, and we will see a solution to this problem without using delegate, which will end in code duplication ("Code smell")
We will refactor the example, seen in the previous lecture, to a better design with the use of delegates, to avoid code duplication
You will see how multiple methods can be invoked through a delegate
You will see how this simple feature helps us, to save a little bit of code, and how it simplifies the usage of delegates
You will see a new example how the built in Action, and Action<T> are used to substitute custom delegates
You will see a new example how the built in Func<T, TResult> is used, and we will get back to the examples you saw in the previous lectures, and refactor them to use Action<T> and Func<T, TResult> combined to make it perfectly clear for you
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.