|
-
May 28th, 2004, 08:42 AM
#1
Thread Starter
Frenzied Member
using a class from one project in another [RESOLVED]
In a solution with multiple projects, how do you reference a class from one to another? I tried adding a reference to the solution itself but that didn't work.
I'm sure it can be done by compiling classes into a .dll but that's not an option right now for me.
Last edited by Andy; Aug 13th, 2004 at 12:05 PM.
-
May 28th, 2004, 08:55 AM
#2
Frenzied Member
Add the class file - classname.vb - to the project.
I'm told you don't need to then use Imports classname in the file you want to use it in if it's in the same namespace, but that doesn't work for me. Maybe the class is in another namespace from the original project, but I don't know how to change the one classfile to a new namespace, or maybe it's a VS 2002 issue. Imports works, though.
-
May 28th, 2004, 09:36 AM
#3
If I plan to use a class in more than one program I always compile the class into a DLL class lib (either a new one or an already existing library)
Then all you have to do is add a reference to that DLL in any new programs that use that class.
I don't live here any more.
-
May 28th, 2004, 11:09 AM
#4
yay gay
Yep, it's the ONLY way for doing it. Or just copy past but that doesn't seem to my like a viable option. . .
\m/  \m/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|