Enum documentation comments

  • Thread starter Thread starter Paul Speranza
  • Start date Start date
P

Paul Speranza

Can anyone tell me the proper way to document enums so that the compiler
won't warn me when I have it generate an xml file for help?

For the following code...

/// <summary>

/// This is the enum for the employee contribution.

/// </summary>

public enum ContributionInterval {Monthly,

Quarterly,

SemiAnnually,

Annually};


....here is what the compiler tells me

C:\MyDir\MyApp\Common\Eligibility.cs(19,13): warning CS1591: Missing XML
comment for publicly visible type or member
MyCompany.Common.Eligibility.ContributionInterval.Annually'





Regards,
Paul Speranza
 
Paul Speranza said:
Can anyone tell me the proper way to document enums so that the compiler
won't warn me when I have it generate an xml file for help?

For the following code...

/// <summary>

/// This is the enum for the employee contribution.

/// </summary>

public enum ContributionInterval {Monthly,

Quarterly,

SemiAnnually,

Annually};


...here is what the compiler tells me

C:\MyDir\MyApp\Common\Eligibility.cs(19,13): warning CS1591: Missing XML
comment for publicly visible type or member
MyCompany.Common.Eligibility.ContributionInterval.Annually'

Give documentation for each enum member, usually a <summary> bit.
 
/// <summary>
/// This is the enum for the employee contribution.
/// </summary>
public enum ContributionInterval {
/// <summary>
/// Monthly description
///</summary>
Monthly,
/// <summary>
/// Quarterly description
/// </summary>
Quarterly,
/// <summary>
/// SemiAnually description
/// </summary>
SemiAnnually,
/// <summary>
/// Annually description
/// </summary>
Annually
};
 
Karen and Jon,

Thank you both very much. I could not find this anywhere
in the online help and it wasn't obvious to me. This
issue is resolved.

Regards,
Paul Speranza
 
Back
Top