473,378 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Reference/Imports

Hello, I am trying to understand how to properly use the "reference" and
"imports".

If I create a "solution" with 2 projects, do they both sare the same
namespace?

When I use the IDE to create a reference between Project1 and Project2 in
that solution, I am actually providing the physical address of where the
reference project(project2) resides. Where is this information stored - or
to put it another way, if I was not using the IDE, how would I go about
creating a reference?

I made the Namespace for Project2 be "Fred" and the class which this
namespace contains is "Fred". What would my "Imports" statement look like.
I have tried "Fred" and "Fred.fred", but it does not seem to like either.

Thanks in advance for your assistance!!!!!!!!!
Nov 20 '05 #1
1 1199
See my responses below...

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Jim Heavey" <Ji*******@nospam.com> schreef in bericht
news:Xn*********************************@207.46.24 8.16...
Hello, I am trying to understand how to properly use the "reference" and
"imports".

If I create a "solution" with 2 projects, do they both sare the same
namespace? No, you can define your default namespace for each project. You can even
define your namespace in code. So even in one single project, it's possible
to have more than 1 namespace.
When I use the IDE to create a reference between Project1 and Project2 in
that solution, I am actually providing the physical address of where the
reference project(project2) resides. Where is this information stored - or to put it another way, if I was not using the IDE, how would I go about
creating a reference? In VS.NET you create a reference to a project that's in the solution (some
sort of GUID I think is stored). Another way to create a reference is to
choose a compiled assembly (dll) to link to.
I made the Namespace for Project2 be "Fred" and the class which this
namespace contains is "Fred". What would my "Imports" statement look like. I have tried "Fred" and "Fred.fred", but it does not seem to like either. If the namespace is Fred, then the imports should look like:
Imports Fred
But be aware that VB.NET also has a default namespace (check the project
properties). So it's possible that your imports would look like:
Imports Project2.Fred
Thanks in advance for your assistance!!!!!!!!!

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Pkpatel | last post by:
Hi, I keep getting this error every time I try to load crystalreportviewer on a webform with a dataset. Here is the error: -------------------------------------------------------- Server...
0
by: muralidharan | last post by:
WebForm1.aspx Code: <%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %> <ComponentArt:TreeView id="TreeView1" Height="520"...
0
by: Ted | last post by:
Hi, I am creating in an ASP Page Load event an empty DataTable in a DataSet as follows: Imports System Imports System.Web.UI.WebControls Imports System.Data Imports System.Data.SqlClient...
1
by: Horace | last post by:
Hello Does anyone know how to remove (or make more general) both the Imports clause (in a class .vb file) and the Page directive (specifically the Inherits clause in a web page .aspx file). ...
2
by: Martin Ortiz | last post by:
Ugh.... All classes are copy by reference, even if you use "ByVal" and NOT "ByRef" it's still a copy by reference. Of course, as a consequence, if you change any values of the object you passed...
7
by: John | last post by:
Hi I open a word document from my vb.net app. Now I want to pass reference to one of the classes in my vb.net app to word so it can access procedures in the vb.net class. How can I pass the...
2
by: Jessica Sterner via .NET 247 | last post by:
I keep getting the error message: An unhandled exception of type 'System.NullReferenceException' occurred in Final2.exe Additional information: Object reference not set to an instance of an...
0
by: Bahige | last post by:
I already have a working Visual Basic .Net Add-in. It loads when the IDE loads and there is a button to run it from the tools menu. It also creates a tool window that can be docked anywhere on...
2
by: jay | last post by:
Believe it or not...I am new to this side of development. I will try to provide a little background on this app...I am calling this from an aspx page. Feeding in the params and basically hoping...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.