
Newbie: separate big .cs file into small .cs files
I don't have any good links right now, sorry.
I'm sure someone else does and will post promptly.
This is a standard OOP design question. You have
lots of functionality and you have to break it down,
but how?
The first question you need to answer is:
- What does my app do?
Then, you need to start thinking about breaking it
down into units of functionality.
Without knowing more about what you're doing, I
can only give general responses.
-c
Quote:
> Hi: C
> Thanks for the email, after got your email, I waw
> trying to move my 8 picuterBoxes into another class,
> but there are a lot of difficulties and problems I
> couldn't solve. (ie: communication between my main Form
> with those pictureBoxes..)
> Do you have any easy to follow tutorial, web site, or
> sample code to teach newbie how to seperate a big .cs file
> into several classes?
> Thank you very much.
> JT
> >-----Original Message-----
> >> Hi: All
> >> My Form1.cs file is getting bigger, so I want to break
> it
> >> into several smaller .cs files, just like in vc++:
> include
> >> a .h file in main.cpp file, and add sub1.cpp, sub2.cpp..
> >> to store functions or data.
> >> How to do that in C#?
> >Types (classes) cannot span more than one file in .NET
> 1.x.
> >One of the planned features for .NET 2.x is types spanning
> >multiple files.
> >This, however, is a standard object-oriented problem.
> >You shouldn't have that much code in one class under
> normal
> >circumstances. You should think about breaking your
> functionality
> >into chunks and moving those chunks into classes.
> >-c
> >.