Delegates: Canât Deal With Them, Canât Live Without Them
See the original posting on DZone Python
There is a famous quote by Jim Henson: âIf you canât beat them. Join themâ.
Itâs possible to write code for years without deliberately using delegates. I say âdeliberatelyâ because we may have used them without realizing it. Knowing what these types represent makes reading code easier. Knowing how to use them adds some useful tools to our developer toolbox. So instead of ignoring them, why not learn them. In this post, I will show you how you can get started with delegates and their use cases, which will encourage you to use them more in your code.