10.2. Defining Guidelines

As guidelines, I would also expect there to be some level of disagreement about these items. If you can't get programmers to agree on tabs versus spaces, you're certainly not going to get them to reach consensus on areas that have even higher levels of grey matter. So, as you review this list, you need to keep in mind that these are only guidelines and are not being represented as rules that are set in stone. Guidelines can and should be violated under certain circumstances. They exist purely to help you define the rules that should shape your general process for deciding how and when to use a generic type. When you find exceptions to the rule, by all means—violate the rule. Just be sure that you can defend each violation and, if you can, you'll be fulfilling the spirit of what the guideline is trying to achieve.

Get Professional .NET 2.0 Generics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.