Solved

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

Posted on 2008-10-07
3
230 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 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