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 inspection: Use explicit or implicit modifier definition for type members

Last modified: 11 February 2024

C# modifiers of types and type members can be written in any order. However, arranging them in a similar way throughout your code is a good practice, which improves code readability. Besides, you may prefer using or not using private and internal modifiers explicitly.

By default, ReSharper suggests to use private and internal modifiers explicitly, and to arrange modifiers in a specific order. If necessary, you can flexibly configure these preferences.

For more information about configuring and enforcing your preferences for type and member modifiers, refer to Code Syntax Style: Modifiers.