Skip to content

Latest commit

 

History

History
22 lines (14 loc) · 640 Bytes

access-level-modifiers.md

File metadata and controls

22 lines (14 loc) · 640 Bytes

Access Level Modifiers

Access level modifiers should be explicitly defined for classes, methods and member variables. This includes defining private even though C# will implicitly add it.

Use the least accessible access modifier, except for public member that is expected to be used by other classes in the future.

Fields & Variables

Prefer single declaration per line.

BAD:

string username, twitterHandle;

GOOD:

string username;
string twitterHandle;