method declaration
-
Hello, my question today is, how do I declare a method which accepts the reference pointer on an other method as argument. here is some pseudo code to demonstrate what I mean.
void humppa() {...} void IwantHumppa(????????){...} void Main() { IwantHumppa(humppa); }
The "??????????" is the part I don't know and where hopefully you guys can help me! Thx! ~HUMPPAAA! -
Hello, my question today is, how do I declare a method which accepts the reference pointer on an other method as argument. here is some pseudo code to demonstrate what I mean.
void humppa() {...} void IwantHumppa(????????){...} void Main() { IwantHumppa(humppa); }
The "??????????" is the part I don't know and where hopefully you guys can help me! Thx! ~HUMPPAAA!delegate void SampleDelegate(int arg1, int arg2, string abc); private void SomeOtherMethod(int arg1, int arg2, string abc){} private void SomeMethod(SampleDelegate sd){ sd(1,2,"test"); } Then in some method SampleDelegate sd = new SampleDelegate(SomeOtherMethod); SomeMethod(sd);
File Not Found
-
Hello, my question today is, how do I declare a method which accepts the reference pointer on an other method as argument. here is some pseudo code to demonstrate what I mean.
void humppa() {...} void IwantHumppa(????????){...} void Main() { IwantHumppa(humppa); }
The "??????????" is the part I don't know and where hopefully you guys can help me! Thx! ~HUMPPAAA!You want a
delegate
.