TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
C# Coding Standard
Search

Rule:  7@106Checked automatically with code checker

Synopsis:Make all types internal by default
Language:C#
Severity Level:4
Category:Object oriented


Description:

To make a more conscious decision on which types to make available to other assemblies first restrict the scope as much as possible. Then carefully decide what to expose as a public type.

Wrong example:

class BaseClass 
{
   public static int intM = 0;
}

Correct example:

internal class BaseClass 
{
   public static int intM = 0;
}



Literature References:
Aviva AV1501