ReSharper
 
Get ReSharper
You are viewing the documentation for an earlier version of ReSharper.

Code Syntax Style: Namespace Imports

Last modified: 21 July 2022

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 details specific to other languages, see corresponding topics in the ReSharper by language section.