Skip to content

Managing large code

ram daryanani

Asked Sep 26, 2010, 9:11 AM EDT2 answers
Share
LinkedInX
I am developing a VB.Net app using VS 2010. The app will generate a lot of code and I do not want a long log code-behind file. A few years back I did a C++ development and I could use "Include" statement to bring in code kept in separate files. That is not available in VB.Net. I have looked at Codefile and Module but little joy. Maybe I am missing something. Any assistance? I am new to VB.Net. Thanks.

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Mahesh Chand
    0
    Any classes (files) you add to a project is by default available to you. You just need to put all classes insides a namespace with same name. You can also create different folders and place different classes (and files) in these folders to manage the large project. For example, if you have a project dealing with customers, products, and invoices, you can create three folders - Customers, Products, and Invoices.

    In Customers folder, you can have files - Customers and Customer. Where Customers class is a collection of Customer and a Customer class defines a customer.

    Hope it helps!
    0
  • 0
    Hello Manesh - thanks for your reply. I guess it is too generic for me. How do I do this with Visual Studio 2010/ VB.Net? Putting the code out into modules or Codefiles doesn't work unless I am doing something wrong. All my code will be under the same namespace but I don't know how to stop it growing into one long piece of coding which will become a little unmanageable, even with comments and so on.
    0