You need to define a delegate type with the same signature of the method. (in this case a very simple one)
public delegate void TestDelegate();
You need to use this type as parameter type:
public void CallTest(TestDelegate i) {
i();
}
... calling it with the test method as delegate
CallTest(new TestDelegate(test));
This is because it is unsafe to assume a method address is simply an integer and would make static type checking (to see if the method fits the expectations) nearly impossible. What would happen if you would pass
i + 1
?
http://msdn.microsoft.com/en-us/library/aa288459%28v=vs.71%29.aspx[
^]
Good luck!