Wiki

Clone wiki

Unit Class Library / Documentation Procedures

Documentation Procedures

Without proper documentation, the unit class library would not be maintainable. Help us to sustain this project by diligently commenting the code you write, especially for complex or nonstandard sections or operations. Below are some standards to follow.

Regions

A unit class's main section generally contains the following regions:

  • _internalVariables
  • Constructors
  • Helper Methods: private methods, if any

The contents of these regions can be inferred from the information above and from the sections in Unit Class Template.

Establishing these regions in this order results in consistency and familiarity across the Unit Class Library. This is documentation of what is where. Individual regions allow for collapsing of code. A region looks like this:

#!c#

#region Constructors
// ... code
#endregion

Summaries

Every constructor and method should have a summary block above it. This type of documentation is especially important for anything that is public. These XML style blocks can be collectively generated into an API documentation. Be sure to fill in the returns and parameter tags with the appropriate information as well. Leave a good legacy!

/// <summary>
/// This override determines how this object is inserted into hashtables.
/// </summary>
/// <returns>Same hashcode as any double would</returns>

Thank you!

Good documentation keeps us alive and thriving! Thank you for making that possible.

Updated