ReSharper
 
Get ReSharper
Get your hands on the new features ahead of the release by joining the Early Access Program for ReSharper 2025.1! Learn more

Code Syntax Style: Namespace Imports

Last modified: 26 May 2024

In each of your source code files, you should have the right set of namespace imports (using directives in C#). If an import is missing, your code does not compile, if there are unused imports, they could make maintaining your code difficult over time. Moreover, there are different approaches to importing namespaces, for example, you can either add using directives or use fully qualified type names, you can place using directives on top of the file or inside a namespace, and so on.

ReSharper provides a number of features to help you control and automatically update all aspects of importing namespaces according to your preferences.

This feature is supported in the following languages and technologies:

The instructions and examples given here address the use of the feature in C#. For more information about other languages, refer to corresponding topics in the Languages and frameworks section.