How to pass function as arguments into another function?

Posted by Oswaldlily under C# on 12/15/2011 | Points: 10 | Views : 1155 | Status : [Member] | Replies : 1
How to pass function as arguments into another function?
public void aaa()
{

}
public void bbb(aaa) // lik this i expect....Is it possible
{

}




Responses

Posted by: Hmanjarawala on: 12/15/2011 [Member] Bronze | Points: 25

Up
0
Down
by defining delegates

public delegate void delaaa();

public void aaa(){

}
public static void main(){
delaaa = aaa;
bbb(aaa);
}

public void bbb(delaaa aaa){

}


Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response