c# - Store property of button which launched action -


on form1 want store name of button called form can execute code depending upon button click

button bt1=new button(); button bt2=new button();  private void b1_click(object sender, eventargs e) {     form1 f1=new form1();     f1.show(); }  private void b2_click(object sender, eventargs e) {     form1 f1=new form1();     f1.show(); } 

add property or member in form1 called callername.

set in constructor.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -