There are often times when you need to do a refactoring, that Resharper cannot help you with. In my last post I described how regular expressions can be useful: Static refactoring with Visual Studio regular expressions This time the case is different and simple replacement would not work in this case. The default value for… Continue reading Refactoring with reflection
Month: February 2021
Static refactoring with Visual Studio regular expressions
Regular expressions are a multi-tool in every developer toolbox. One of the places they can be useful is Quick Find and Quick Replace dialogs in Visual Studio. In this post, I’m going to show you how you can use the power of regular expressions in smart refactoring. Changing an enum to string Let’s assume I’d… Continue reading Static refactoring with Visual Studio regular expressions
Returning more than one result from a method – tuple
Have you ever had a case, when you needed to return more than one parameter from a method? There are a couple of ways to cope with that and tuple might just be what you need. The problem Let’s look at the code, where we parse transaction data just to show it on the screen.… Continue reading Returning more than one result from a method – tuple