I am wondering if it is possible (and what the syntax would be) to send an object's method to a function.
Example:
Object "myObject" has two methods "method1" and "method2"
I would like to have a function along the lines of:
public bool myFunc(var methodOnObject)
{
[code here]
var returnVal = [run methodOnObject here]
[code here]
return returnVal;
}
So that in another function I could do something like
public void overallFunction()
{
var myObject = new ObjectItem();
var method1Success = myFunc(myObject.method1);
var method2Success = myFunc(myObject.method2);
}