Design guidelines – again
By rickvdbosch
- 1 minutes read - 134 wordsI saw a presentation monday to explain the basics of .NET to some starting developers. In that presentation, I saw a piece of code design I don’t think should be showed. Ever. Especially to people who are about to enter the .NET world. In one cs-file, I saw a base class, two inheriting classes and then again two classes which inherited from on of the former mentioned classes. So there were 5 public classes in one file. A shiver ran down my back …
The internal Microsoft Codeing Guidelines I blogged about earlier clearly state: ‘Source files should contain only one public type’ and I strongly agree. If you need some internal classes, that’s fine. But multiple public classes in one file? That’s not done… At least, I think so. What do you think?