Test Design StudioGo to Previous Topic: CA0207 - Document public variablesGo to Next Topic: Naming Convention Rules

CA0208 - Document private variables

Summary

Variables are used extensively in software development, but the purpose of variables is not always clear. Document those variables so that users fully understand what the value represents or how it is to be used.

Note:    This rule applies to variables of Private scope. See rule CA0207 for variables of Public scope.

Solution

Include XML Comments for the variable declaration with at least the 'summary' and the 'value' tag. The 'value' tag must also include a 'type' attribute to define the type of data that is stored in the variable.

[VBScript] - Copy Code
''' <summary>Document the variable here</summary>
''' <value type="Integer" />
Private timeout = 60