M
memememe
Is there a way to pass a method as a paramenter when you call a method,
kinda like you do when you create an event handler.
Basically I want to be able to call method A() and tell it to call method
B() but sometimes I want it to call method C(). I know how to design this if
I use interfaces or abstract classes, B() and C() will share signature, and
will most likely be members of similar classes, so using interfaces or
abstract classes is a choice, I just want to know if there is a way to pass
a method as a parameter as an alternative choice.
kinda like you do when you create an event handler.
Basically I want to be able to call method A() and tell it to call method
B() but sometimes I want it to call method C(). I know how to design this if
I use interfaces or abstract classes, B() and C() will share signature, and
will most likely be members of similar classes, so using interfaces or
abstract classes is a choice, I just want to know if there is a way to pass
a method as a parameter as an alternative choice.