-
[2.0] wat
I read MSDN help about partial classes.
But I still don't get why and when (actually WHEN) we need to use partial Classes? I can't assume when in real world will Partial classes be used?
Any ideas or thoughts from you folks is greatly helpful and appreciated.
thanks
nath
-
Re: [2.0] wat
Visual Studio 2005 uses partial classes to place code that is generated by the Form Designer into a seperate file from user code. If you have a very large class with clearly seperated subsections, maybe multiple Interfaces that it implements, it might make sense to place each subsection in a seperate file.
-
Re: [2.0] wat
Segregating large classes into logical blocks, as sunburnt mentions, is where the advantage lies. As an independent developer I've never used partial classes other than those created by the IDE itself. In an environment where there are multiple developers working on very large projects it could be a godsend though. It means that multiple developers can work on the same class at the same time, where normally only one developer would be able to check out a class file at a time.