Solved

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

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

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

820 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