CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2012
    Location
    India
    Posts
    193

    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 ..

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Pl Help for basic question ..

    Quote Originally Posted by new_2012 View Post
    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).
    Quote Originally Posted by new_2012 View Post
    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.

  3. #3
    Join Date
    Jan 2012
    Location
    India
    Posts
    193

    Smile 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
  •  





Click Here to Expand Forum to Full Width

Featured