I am using Resharper for refactoring. What is this type of feature called when you have the same code in around 5 different events being called but you want to replace them with a method call? And place that code in that method.
All done automatically.
Thanks
The best time for refactoring is before adding new features or updates to existing code. Doing so can help improve the product's quality. By cleaning the code base before adding new features or updates, it helps to make the product more robust and easier to use in the future.
It's safe to say that duplicate code makes your code awfully hard to maintain. It makes your codebase unnecessary large and adds extra technical debt. On top of that, writing duplicate code is a waste of time that could have been better spent.
The goal of refactoring is to improve internal code by making many small changes without altering the code's external behavior. Computer programmers and software developers refactor code to improve the design, structure and implementation of software. Refactoring improves code readability and reduces complexities.
I've been working on a Resharper plugin that does what you are asking. That is, it scans your code, searching for sections that can be replaced by an existing method call. A section can be a whole method or just a part of a method. When it finds one, the lightbulb pops up and offers to replace said section with a call to the existing method.
(source: landofjosh.com)
I call it AgentRalph. At this point it's not ready for production use, but I've been making a lot of progress and hope to make a release soon.
Extract Method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With