Solved

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

Posted on 2008-10-07
3
226 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
3 Comments
 
LVL 14

Assisted Solution

by:dfu23
dfu23 earned 100 total points
Comment Utility
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 85

Accepted Solution

by:
Mike Tomlinson earned 150 total points
Comment Utility
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
Comment Utility
thanks
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now