Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rename control methods in Windows Forms application

Tags:

c#

.net

winforms

I have just started coding in C#, and have been attempting to make a GUI application. I made a menu strip and wrote some code for one of the menu items. The method for clicking that menu item was automatically named "openToolStripMenuItem_Click".

In the properties I decided to change the name of the menu item from "open" to "save", but the method name remains the same, which is quite irritating. How do I get it to automatically adjust the method names when I rename a control?

like image 867
Lanaru Avatar asked Jul 07 '26 21:07

Lanaru


1 Answers

This is not done automatically. A good way is to right-click the method name and use refactor + rename.

like image 134
Lanaru Avatar answered Jul 10 '26 10:07

Lanaru



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!