Solved

how do I put code in other files in vb.net?

Posted on 2008-10-07
3
232 Views
Last Modified: 2008-10-09
I'm working on a vb.net project (Winform) and I'm starting to get more code than I can manage in one file. Can someone give a brief tutorial on how to put the classes that I have working in another file(s)? Just a basic template will do.

Dan
0
Comment
Question by:zliminator
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 14

Assisted Solution

by:dfu23
dfu23 earned 100 total points
ID: 22660094
personally I usually put one class in one file

Person.vb
Business.vb

etc ...

But how big is your project? Would it make sense to break things out into a basic library for reuse? Separate your business logic from your objects and your presentation and interface logic as well?
0
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 150 total points
ID: 22661148
You just use the "Partial" keyword:
http://msdn.microsoft.com/en-us/library/yfzd5350(VS.80).aspx

Or you can use "Regions" to manage the class VISUALLY in the IDE:
http://msdn.microsoft.com/en-us/library/sd032a17(VS.80).aspx

0
 

Author Comment

by:zliminator
ID: 22677432
thanks
0

Featured Post

CHALLENGE LAB: Troubleshooting Connectivity Issues

Goal: Fix the connectivity issue in the lab's AWS environment so that you can SSH into the provided EC2 instance.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question