-
May 2nd, 2013, 04:00 AM
#1
Pl Help for basic question ..
I am in need to do C# project .. to read parameter file and set parameters , set display , open result file , print data when needed , analyze data etc ..
I think I will design different class libraries for different tasks and
will reference them in my Main Project.
Is it ok ?
Also I will need a lot of code to handle all this. Writing it in one mainForm.cs file may not hold good. How can I use multiple code files which will contain methods which will use class library functions and will support MainForm.cs
Any other design idea ?
PL help ..
Thanking you ..
-
May 2nd, 2013, 11:06 AM
#2
Re: Pl Help for basic question ..
Originally Posted by new_2012
I think I will design different class libraries for different tasks and
will reference them in my Main Project.
Sure you can, but does it makes sense to do so? Are you planning on using these assemblies in another application? If so, then do it. Do you plan that you're app is going to be complex with all sorts of different functionality and many different classes? If so, then you can categorize the functionality into different assemblies (even if you don't plan on using them in another app).
Originally Posted by new_2012
Also I will need a lot of code to handle all this. Writing it in one mainForm.cs file may not hold good. How can I use multiple code files which will contain methods which will use class library functions and will support MainForm.cs
Generally you use a different .cs file for each class that you create. I generally follow a more laxed interpretation of this guideline which is to put related classes in a single file. Well I do that if each class is very small. For larger classes, I tend to split out class functionality into different .cs files using the 'partial' class modifier. Sometimes a class needs to manage a lot of functionality. No one wants to maintain a file with 10,000 lines of code, so I split out the class with the partial keyword and group different areas of the class into separate .cs files.
-
May 2nd, 2013, 11:35 PM
#3
Re: Pl Help for basic question ..
Thankx a lot Arjay Sir ,
You gave me a very good think line and I will follow that.
I feel that I can design my project in neat and structured manner.
These guidelines are very useful as one cant find them in any book.
I am struggling on my own and have decided to complete the project successfully.
Thank u once again
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
|