Hello Guys,
I am having a hard time with passing a function name as a parameter to another function.
I have the following setup:
1. There are 2 classes (A and B)
2. I am trying to write a function in class A which would be executing methods from class B.
I know I can pass a class instance and then run the method from that instantiated class... but I just can find a way to also pass a method name as well (don't want to type the name manually).
I found a good example over here:
http://stackoverflow.com/questions/2082615/pass-method-as-parameter-using-c-sharp[
^]
But the problem is that this example shows how to pass method name of the same class (in other words you can access the method directly without having to instantiate the class).... in my case it's a bit different story - I have to instantiate the class....
Thank you in advance guys!
Modestas