Skip to content

Examines how delegates work in C# by covering different types of delegates, including single-cast and multi-cast delegates.

Notifications You must be signed in to change notification settings

jepozdemir/csharp_delegates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Delegates in C#

This repository contains code samples and techniques referenced in my Medium blog post, "Delegates in C#". This post and repository focus on understanding delegates in C#, their significance in programming, and practical usage.

Overview

In this blog post, I discuss delegates, that allows methods to be passed as parameters, enabling flexible and dynamic method invocation.

Topics Covered

  • What Are Delegates?
    An introduction to delegates and how they act as type-safe function pointers.

  • Creating and Using Delegates
    Detailed explanation of how to declare, instantiate, and invoke delegates with examples.

  • Multicast Delegates
    Discussion on multicast delegates, which can reference multiple methods and how to handle them.

  • Built-in Delegates
    Explanation of some handy built-in delegate types, which simplify the usage of delegates.

  • Practical Examples
    Real-world scenarios demonstrating the use of delegates for callbacks and event handling.

How to Use

  1. Read the Blog Post: Start by reading the full blog post on Medium here.
  2. Explore Code Samples: Review the repository for code examples demonstrating the use of delegates in C#.
  3. Implement in Projects: Use the provided examples to practice implementing delegates in your own C# applications.

Contributing

Contributions are welcome! If you have suggestions for improvements or additional examples, feel free to open an issue or submit a pull request.

Feedback and Suggestions

If you have any feedback on the blog post or this repository, please leave a comment on the Medium post or reach out through GitHub issues.

License

This project is licensed under the MIT License.

Thank you! If you found this helpful and would like to show support; don't forget to give it a star and share it with others who might benefit from it.πŸ‘πŸ‘πŸ‘πŸ‘πŸ‘

About

Examines how delegates work in C# by covering different types of delegates, including single-cast and multi-cast delegates.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages