Link to home
Start Free TrialLog in
Avatar of brgdotnet
brgdotnetFlag for United States of America

asked on

How to reference a VB .net class once I create it?

I created a VB .net class for my poject. The class was by default placed in a folder named "Solution Items". How do I reference this class in other VB.net files? Also the class is a static class.
Avatar of Shaun Vermaak
Shaun Vermaak
Flag of Australia image

It is easier if both projects are in the same solution. This way you can select Add Reference from Solution Explorer and browse to the other project from the project tab.
Avatar of brgdotnet

ASKER

They are in the same solution. Only a folder was created for the class named "Solution Items". They are indeed in the same solution.

How do  reference the class from other VB.net modules?
ASKER CERTIFIED SOLUTION
Avatar of Shaun Vermaak
Shaun Vermaak
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hey Shaun,

My solution has several projects in it. How do I make the static class available to all projects?
Add a reference to all projects, Import into modules and use the public methods
Typically when I add a reference, it is to a dll file? What at am I adding a reference to?
I don't get it? In C# you create a C# class and wrap it in a namespace. Then you can import the namespace.

I know that in VB.net things are different. but referencing the class through add reference dialog, does not sound right to me?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial