httpNick httpNick - 27 days ago 5x
C# Question

How to change default access modifer added by CodeMaid

I am using the Visual Studio CodeMaid plugin currently and when I press

to cleanup my active document it adds a default access modifier of
to my class/interface/etc.. I've looked through the options to change it to be
, but haven't had any luck. Is it possible to change this?


For most member types:

internal is the default if no access modifier is specified. Access Modifiers (C# Programming Guide)

CodeMaid has the option to explicitly specify the access modifier in order to reduce the chance for developer confusion. You can disable this behavior at CodeMaid->Options->Cleaning->Insert->"Insert explicit access modifiers for" and toggle individual member types (e.g. classes, properties, etc.)

If you want to change something from its default internal to public, you will need to explicitly add the public access modifier.

Hope it helps.