Skip to content
makolyte

makolyte

Solve real coding problems

  • About
  • C#
  • SQL

delegate

C# – Pass in a Func to override behavior

01/26/202506/27/2020 by Mak

If I want to change the behavior of a method from the outside, I can pass in a function pointer. This approach exists in every language, and is one way to implement the Strategy Pattern. In C#, function pointers are referred to as delegates, and the two most common ones are Action and Func. The … Read more

Categories C# Tags array, byte-array, delegate, for-loop, func, new-array, optional-parameters, switch
About โ€ข Privacy Policy
© 2025 makolyte