How To get code to be execute of button click in runtime anywhere

Suppose name of button is button1
then we need to do as folllowing
button1.PerformClick();
this will execute code under click event of button1
Next Recommended Reading How to run .EXE on button click in C#