473,503 Members | 2,289 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Include external file

I'm sorry for the (potentially) stupid question I'm about to ask.
I've looked through the docs and I've also searched on google
(perhaps I'm looking for the wrong thing?) and I just can't find
the answer to this.

I have 2 files. One is my primary class and the other is my
support class. When compiling, how do I make it so that the
file containing the support class is compiled in for use by the
file containing my primary class? I've tries the "using" directive
but I just keep getting the error

"The type or namespace name 'MyClassName' does not exist
in the class or namespace 'MyNamespaceName' (are you missing
an assembly reference?)"

'MyClassName' does exist in namespace 'MyNamespaceName'
in the second file. So I'm not sure what's going on. What am I
missing? Where can I find information on how to do what I am
trying to do?

thnx,
Chris
Nov 16 '05 #1
1 3669
The possible for causing the error is,

1. your support class may be in the different namespace. If thats the case,
add "using supportNamespace" (for example) in the first class.

2. Your support class may be just a generic class. It may not have namespace
at all. Add namespace tag to bring it under namespace.

Shak.
"Christoph" <jc*****@yahoo.com> wrote in message
news:#y*************@TK2MSFTNGP11.phx.gbl...
I'm sorry for the (potentially) stupid question I'm about to ask.
I've looked through the docs and I've also searched on google
(perhaps I'm looking for the wrong thing?) and I just can't find
the answer to this.

I have 2 files. One is my primary class and the other is my
support class. When compiling, how do I make it so that the
file containing the support class is compiled in for use by the
file containing my primary class? I've tries the "using" directive
but I just keep getting the error

"The type or namespace name 'MyClassName' does not exist
in the class or namespace 'MyNamespaceName' (are you missing
an assembly reference?)"

'MyClassName' does exist in namespace 'MyNamespaceName'
in the second file. So I'm not sure what's going on. What am I
missing? Where can I find information on how to do what I am
trying to do?

thnx,
Chris

Nov 16 '05 #2

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

Similar topics

17
3296
by: lallous | last post by:
Hello Sometimes, I don't know when exactly, when I try to include an external js file as: <script src='myfile.js'></script> that .js file goes not included in some cases!! To solve it, I...
3
2416
by: Juergen Stein | last post by:
Hi Group, I couldn't find an answer on this with Google, so let me test you :) I've a fairly complex WebApp, and I put most of the JS code in independent external .js files. One of these...
6
7048
by: alan | last post by:
Dear all, I have written my own function by C. And my development platform is W2k with VC6.0. Then I also defined a header file to extern declare this function. After that, I include this...
6
9564
by: atv | last post by:
Alright, i have some questions concerning include files en global variables.I hope someone is willing to answer these. 1).Why is it that if i define a global variable in a file, say main.c, and...
6
2037
by: Dmitri Shvetsov | last post by:
Hi All, Does somebody know how can I include an external file into my C# source file? I need to insert the same strings (about 5-10) into about 75 different files, probably I will need to...
22
1694
by: maxwell | last post by:
I'm having a problem using the XML "include" mechanism, which I think has to do with namespaces. I have an XML file that has a lot of repetition--a sequence of elements that appear multiple...
2
3542
by: jmcmejl | last post by:
Hi I have a question regarding including an xml file into another. I have googled and found this: Mainfile.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE adocname> <arootnode>...
5
1895
by: frazzle | last post by:
I have been developing a system in PHP that uses MySQL. To that end, I have used a config file to hold high level fixed variables (database name, user id, password, etc) and I using "require_once"...
2
7097
by: joe t. | last post by:
My apologies, i'm not sure how to ask this question correctly, so i'll give the examples as i go. First, i *think* my problem is described here, but i may be misunderstanding:...
3
1523
by: Bob Bedford | last post by:
Hi all, I've a problem and can't resolve it. I've a include.inc.php file with only line is a huge query. to make it simple, the query is $query = "select * from xxx where mode = ".$mode ...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7291
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5598
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1522
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.