Do you declare member accessibility for all classes?
26/04/2018 8:48 AM by
Not explicitly specifying the access type for members of a structure or class can be deceiving for other developers that are using this structure or class. The default structure and class members access in Visual C# .NET is always private. The default class member access in Visual Basic .NET is private. However, the default structure member access in Visual Basic .NET is public.
Match MatchExpression(string input, string pattern) Figure: Bad - Method without member accessibility declared
private Match MatchExpression(string input, string pattern) Figure: Good - Method with member accessibility declared
We have a program called SSW Code Auditor to check for this rule.
Do you feel this rule needs an update?