473,320 Members | 1,988 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,320 software developers and data experts.

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 3663
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
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
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
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
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
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
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
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
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
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
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
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.