Why I love Resharper 3

Learning new language features can be hard. Applying them can be tricky. How does Resharper aid with filescoped namespaces?

Published on 09 December 2021

With the new C# language features Resharper is a great way to learn them through it's many refactoring options.

One of the latest C# language features is filescoped namespaces. When I first saw the functionality I was not a fan. I didn't see the need or use case for it. I didn't see why people were so obsessed with getting rid of 1 less indentation. Now to be honest I'm still not 100% sure this is a valid argument however while writing my Advent of Code solutions this past week or so I have started to appriciate the feature.

As with all new language features Resharper is there to aid and teach them. A number of new features I have learnt or at least seen working by letting Resharper refactor some code I've written into the new structures. This feature is no different.

Filescoped Namespace

The quite cool option is not only can it do it across projects and solutions, like a lot of refactoring, but also it can do it in reverse. So if you've applied the change and not a fan it can help you change it back!

More information can be found on the Jetbrains blog about the new version of Resharper click here.

Remember though ...

With great power comes great responsibility.

Any questions/comments then please contact me on Twitter @WestDiscGolf