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
Sandor Maraczy is a Microsoft Certified Software Engineer. He became passionate about programming and automation in the beginning of college, where he studied Business Information Technology.
He first started to deal with programming in Java and C#, and he always felt, that he is interested in coding in more depth, so beside college he also improved himself at home. He found really good resources online, by a guy called John Sonmez, who inspired him. He learned to code step by step by actually doing it, so he could soon break into the field as a software engineer.
He also helped a lot to hiss classmates at college, where he got a lot of compliments for the way he explains basic programming concepts.
Today he is an Instructor on Udemy, because he believes, that through his simple examples, you will not only learn the purpose of the concepts, but also know, how they are worth to be utilized, when developing a software.
If you'd like to learn easily in small time, I encourage you to enroll to one of his courses today!