How do I comment a publicly visible type Enum?
How do I comment this Enum so that the warning does not appear? Yes I realize that comments are unnecessary, but if commenting is easy and it resolves the warnings then I'd like to do it.
Warnings that appear: Missing XML comment for publicly visible type or member
/// <summary>
/// Conditional statements
/// </summary>
public enum ConditionType
{
Equal,
NotEqual,
GreaterThan,
GreaterThanOrEqual,
LessThan,
LessThanOrEqual
}
Like this:
/// <summary>
/// Conditional statements
/// </summary>
public enum ConditionType
{
///<summary>A == B</summary>
Equal,
///<summary>A != B</summary>
NotEqual,
///<summary>A > B</summary>
GreaterThan,
///<summary>A >= B</summary>
GreaterThanOrEqual,
///<summary>A < B</summary>
LessThan,
///<summary>A <= B</summary>
LessThanOrEqual
}
(Yes, this can get very tedious)
You may want to use different texts in the comments.
By the way. your enum should actually be called ComparisonType
.
Comment each member:
/// <summary>
/// Conditional statements
/// </summary>
public enum ConditionType
{
/// <summary>
/// Tests for equality
/// </summary>
Equal,
/// <summary>
/// Tests for inequality
/// </summary>
NotEqual,
// etc..
}
You may also want to check out GhostDoc for easy commenting