Results 1 to 3 of 3

Thread: [2.0] wat

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2003
    Posts
    436

    Question [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

  2. #2
    PowerPoster sunburnt's Avatar
    Join Date
    Feb 2001
    Location
    Boulder, Colorado
    Posts
    1,403

    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.

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width