Linked by Eugenia Loli on Sun 15th Jan 2006 23:19 UTC
.NET (dotGNU too) Partial classes permit splitting a single class, interface, or struct into multiple, separate files. There are several advantages to splitting these elements into many files, including permitting more than one developer to work on the same class. Paul Kimmel shows where partial classes are used and how you might use partial keywords to fine-tune your productivity.
Permalink for comment 86071
To read all comments associated with this story, please click here.
Member since:

If you're tempted to use partial classes, then your "god class" really ought to be split up into multiple, smaller classes. This is known as "refactoring". Once you've done this, you won't need to split up a class definition file into multiple files. Your code will be easier to understand and maintain, and there will be less of a likelihood that multiple developers will want to work on the same class at the same time.

I'm worried that developers will flock to partial classes because it encourages poor structural design.

Reply Score: 3