G
Guest
Hi,
How can I send a method as a parameter to be executed in a class?
If possible without using delegate.
public void MethodA()
{
// Code
}
public void ExecuteMethod( * MethodParam )
{
// Invoke the method parameter
**MethodParam.invoke();
}
public void main()
{
// Call ExecuteMethod sending MethodA as a parameter
ExecuteMethod( * MethodA );
}
How can I send a method as a parameter to be executed in a class?
If possible without using delegate.
public void MethodA()
{
// Code
}
public void ExecuteMethod( * MethodParam )
{
// Invoke the method parameter
**MethodParam.invoke();
}
public void main()
{
// Call ExecuteMethod sending MethodA as a parameter
ExecuteMethod( * MethodA );
}