No refactoring function.

Source: Internet
Author: User

An ASP. net project, because the system modeling stage is not fully considered, an inappropriate class name is given to a class. As a result, when the development is late, the names of the classes to be created are occupied. In order not to cause confusion in the future, I decided to change the class name for the previous class by matching the semantics with the entity as much as possible.

In the past, JBuilder was used. It has the refactoring function. Right-click the class definition point and there is the rename option. After rename, allCodeAll related class operations in are changed to a new name, which is very convenient. Unfortunately, vs. net2003 does not have this refactoring function. I cannot understand why this implementation is very simple and has not been valued by the m$ development team. In desperation, I had to use the global replacement method. Replace all the complete and abbreviated class names (such as when used as the Instance name prefix) and class name combinations (such as data access functions corresponding to this class. The replacement function of vs. NET is not complete, and non-project files in the project directory cannot be replaced. Therefore, you only need to use editplus2.12 to perform a full Directory Search and replacement operation. This completes the class name change.

Test the function immediately after modification to check whether the system is affected by the change. All functions are operated once, and some core functions are operated several times back and forth without any obvious errors. It can be considered that this renaming was initially successful. It's just a preliminary step, because there may be some hidden and deep errors that will gradually emerge in the future use process. Now, I am alone and cannot find them instantly.

It took me a long time to make a try ~ I heard that vs. net2005 will add the refactoring function. If the rumor is true, I am waiting for the benefits of the majority of code workers ~~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.