|
-
May 27th, 2006, 07:54 PM
#1
Thread Starter
Hyperactive Member
[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
-
May 27th, 2006, 07:56 PM
#2
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.
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
-
May 27th, 2006, 09:18 PM
#3
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|