How to rename an event handler ?

Описание к видео How to rename an event handler ?

Two Parts to Renaming an event handler

PART 1

1. Select the control in the Designer window.
2. Then, in the Properties window, locate the Name property (Make sure that you work with the Name property and not the Text property).
3. Simply delete the old name for the control (e.g., addButton) and replace it with the desired name (e.g., sumButton).

PART 2

1. In code view, right-click on the existing event handler name (e.g., addButton_Click).
2. A pop-up menu will appear. Click on the menu item named Rename.
3. After selecting the Rename command, the Rename dialog box appears on the screen.
4. The existing name of the event handler is highlighted in the Code window.
5. Edit the highlighted code for the event handler name to the new name desired (e.g., sumButton_Click).
6. Then, click the Apply button in the Rename dialog box to complete the renaming process.

Комментарии

Информация по комментариям в разработке