CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2002
    Location
    Germany
    Posts
    49

    Post Divide a class in to files

    Is there any way to divide a C# class into two or more files. My sourcefile for a windows-form-class enlarged up to more then 100k and it takes a long time to load it with VisualStudio.
    susad

  2. #2
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    265
    Your class is too big. There is no good reason you would need a class to be that big. Refactor/redesign.

    That being said, the next version of C# will most likely allow you to split a class definition over multiple files, through a mechanism called partial classes. I just hope this will not merely become an excuse for the kind of sucky design that leads to monster classes.

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

Featured