I am having trouble understanding delegates – since it is easier to ask this question in CSharp vs English, I wrote the following:

Please consider the following considerations:

Why would I use delegates (in Consideration A), vs not using them (in Consideration B)?

My assumptions include:

  • Delegates make it easier to expand.. in order to expand you would only need to add one single new method, versus having to add a line to an enum, and a switch statement.

  • You can run other methods through the delegate, versus just switching to an enum and doing X.

  • For example, you could have another method, in Consideration A, like this:

Thank you for considering this post. 😉

submitted by /u/oze4
[link] [comments]

Leave a Reply