Learn and Understand C# Delegates fast by coding
4.5 (41 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
1,816 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Learn and Understand C# Delegates fast by coding to your Wishlist.

Add to Wishlist

Learn and Understand C# Delegates fast by coding

Make your code powerful by using C# Delegates today, and understand it step-by-step through real world examples!
4.5 (41 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
1,816 students enrolled
Created by Sandor Maraczy
Last updated 11/2016
Curiosity Sale
Current price: $10 Original price: $75 Discount: 87% off
30-Day Money-Back Guarantee
  • 1 hour on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Create and use delegates
  • Understand the real purpose of using delegates even without events in object-oriented programming
  • Recognize the scenarios, when you could make use of the delegates
  • Invoke multiple methods through a delegate
  • You will not only learn delegates in an easy way, but fully understand the concept of it
  • Create and use the built in Action<T>
  • Create and use the built in Func<T, TResult>
View Curriculum
  • Visual Studio Community installed (Free)
  • Basic understanding of programming in C#: variables, methods, creating classes and objects
  • Basic understanding of Object-oriented programming (OOP)

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?

  • Because this course will give you an in depth introduction to delegates
  • Because one simple example may not be enough for you to recognize the situation for a delegate to be useful in software development
  • Because instead of declaring one simple example, I'll cover logically built, more realistic examples to make the topic simple for you to learn and understand
  • You will learn how Action<T>, and Func<T, TResult> work, which is inevitable to know for writing LINQ queries 

What will you learn in this course?

  • You will learn what a delegate is
  • You will learn how to create and use delegates
  • You will see the difference of direct method invocation and delegate invocation
  • You will see how useful delegates can be through logical examples
  • How to avoid code duplication by using delegates
  • How to invoke multiple methods through delegates
  • How delegate inference can help us to write simpler code
  • How to use Action, Action<T>, Func<T, TResult>

Why should every C# developer be familiar with the concept of delegates?

  • Delegates are extremely critical part of the .NET Framework
  • Might be the solution for a lot of problems when developing a software
  • Using delegates will allow better code reuse to your software
  • Your code can become more flexible and powerful when using C# delegates
  • You will very commonly use delegates, when using events, creating LINQ queries etc.

Who is the target audience?
  • Any C# developer, who just started out, and want to fully understand delegates through examples
  • Any C# developer without experience
  • Any C# developer, who wants an in-depth clarification about delegates
  • Any C# developer, who is familiar with the topic, but wants to strengthen his/hers knowledge
Students Who Viewed This Course Also Viewed
Curriculum For This Course
Course Introduction
1 Lecture 01:35
Introduction to C# delegates
8 Lectures 53:03

You will learn what a delegate is, how it can be declared, instantiated, explained through my slides

What is a delegate?

You can now start coding with me, and see how a custom delegate is used in code

Preview 05:12

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")

Code duplication is growing - an example without using delegates

We will refactor the example, seen in the previous lecture, to a better design with the use of delegates, to avoid code duplication

Refactor code to make use of delegates and avoid code duplication

You will see how multiple methods can be invoked through a delegate

Multicast delegates - Adding multiple delegates to the invocation list

You will see how this simple feature helps us, to save a little bit of code, and how it simplifies the usage of delegates

Preview 05:08

You will see a new example how the built in Action, and Action<T> are used to substitute custom delegates

Using Action, Action<T>

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

Using Func<T, TResult>

Quiz on delegates
3 questions
About the Instructor
Sandor Maraczy
4.5 Average rating
41 Reviews
1,816 Students
1 Course
Microsoft Certified Software Engineer, Udemy Instructor

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!