Rename

You can change the name of a method, field, property, class, or anything else by using the Rename feature of Visual Studio, as shown in the following screenshot. To do this, highlight the entity and press Ctrl + R twice. Alternatively, go to Edit | Refactor | Rename. When you change the name this way, it will be updated wherever it is used. This simple refactoring step allows you to change the name of something anytime you like:

Get Hands-On Object-Oriented Programming with C# now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.