Consider Using MAJOR Comments to Divide Longer Data Types into Clear Sections [DS7] [WHAT] [WHERE]

Consider Using MAJOR Comments to Divide Longer Data Types into Clear Sections [DS7] [WHAT] [WHERE]

Tip DS7

Many data types - notably classes - can grow to be pretty long, particularly if they have many methods or member variables. In such cases, consider using MAJOR section heading comments or #regions (if your language/environment supports them) to divide a class into clear, cohesive sections to help readers find what they are looking for.

See the following example:

Code in the zone ad.png