Test Design StudioGo to Previous Topic: CA0204 - Document private methods and propertiesGo to Next Topic: CA0206 - Document private constants

CA0205 - Document public constants

Summary

Constants are an excellent tool to centralize the definition of key values. Document those constants so that users fully understand what the value represents or how it is to be used.

Note:    This rule applies to constants of Public scope. See rule CA0206 for constants of Private scope.

Solution

Include XML Comments for the Constant 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 constant.

[VBScript] - Copy Code
''' <summary>Document the constant here</summary>
''' <value type="Integer" />
Public Const TIMEOUT = 60