Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2008-10-07
3
Medium Priority
?
239 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 400 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 600 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

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:…
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…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

885 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