473,399 Members | 3,603 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,399 software developers and data experts.

2 questions I hope make sense

1.
I am creating a project that will have many c# files
(100+). I want to split this project up into modules but
I am not sure what the best way would be. I was thinking
of creating a blank project and creating other projects
inside this blank project where each one of these
projects would have one namespace. Is there a better way
of organizing a project? Can I have just one project
that contains many other namespaces?

2.
I have a C# file called A.cs which is in a namespace
called AA which is in a project called AAA.
I also have a C# file called B.cs which is in a namespace
called BB which is in a project called BBB.
In B.cs, I want to use the A.cs file. So at the
beginning of the B.cs file, I put:

using AA;

However, I get the following error message:
The type or namespace name 'AA' could not be found (are
you missing a using directive or an assembly reference?)

What can I do to solve this? Any ideas to these questions
will be greatly appreciated. Thanks for your reply.

Mike
Nov 15 '05 #1
1 1365
Hi Mike
I will attempt to answer them for you :)
1. You can split the files into a number of projects and compile each
project into a .NET Module (not assembly!) then you can link the one or more
modules into an Assembly (you have to use the command line compiler to do
all this). That gives you some flexibility in how you use the IDE and
solutions. Try and keep the same namespace in one project ( more for ease
of use than any problems with the framework). As far as i know you can have
more than one namespace per project (even per file - but not per class)

2. Project BBB needs to add a reference to project AAA if they are in the
same solution or Project BBB needs to add a reference to assembly AA if not.
Both ways end up having a copy of assembly AA in the same directory as
assembly BB. Then your using statement will work :)

Hope it helps
Mark

"Mike" <mi*******@hotmail.com> wrote in message
news:08****************************@phx.gbl...
1.
I am creating a project that will have many c# files
(100+). I want to split this project up into modules but
I am not sure what the best way would be. I was thinking
of creating a blank project and creating other projects
inside this blank project where each one of these
projects would have one namespace. Is there a better way
of organizing a project? Can I have just one project
that contains many other namespaces?

2.
I have a C# file called A.cs which is in a namespace
called AA which is in a project called AAA.
I also have a C# file called B.cs which is in a namespace
called BB which is in a project called BBB.
In B.cs, I want to use the A.cs file. So at the
beginning of the B.cs file, I put:

using AA;

However, I get the following error message:
The type or namespace name 'AA' could not be found (are
you missing a using directive or an assembly reference?)

What can I do to solve this? Any ideas to these questions
will be greatly appreciated. Thanks for your reply.

Mike

Nov 15 '05 #2

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

Similar topics

3
by: Jim Williams | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** I have some questions aboyt XML, and it's use for file loading/saving. I'm working in a C++ environment, on MS Windows. I'll try...
5
by: John Sheppard | last post by:
Hi all, I am not sure that I am posting this in the right group but here it goes anyway. I am new to socket programming and I have been searching on the internet to the questions I am about to pose...
39
by: Hareth | last post by:
C# 2005 express & vb 2005 express: 1. During runtime, I can edit my codes in C#..... How come this cannot be done in VB? it says ...."read-only" during runtime...... 2. Why does vb...
4
by: Steve | last post by:
I have read a couple articles online, read my Jesse Liberty book but I am still confused as to just what the best practices are for using exceptions. I keep changing how I'm working with them and...
16
by: wdh3rd | last post by:
Hi everyone. I'm new to C and I have a few questions: I am making files for permutations and combinations. Files to be made are perm.c, perm.h, combo.c, and combo.h. Since both combinations...
22
by: Guru Jois | last post by:
Hai all, I have some question. Please answer. 1. What is walking pointer? 2. What is difference between procedure and subroutine? 3. What is template of main in C? 4. What is padding of...
33
by: john | last post by:
I am reading TC++PL3 and in "21.3.3 Stream State", 4 member functions returning bool are mentioned: template <class Ch, class Tr= char_traits<Ch class basic_ios: public ios_base { public: //...
2
by: ManWithNoName | last post by:
Yay guys! I hope you all are having a warm fuzzy loveable day. The following questions are kind of related to this thread: Protect files (on web server) from web admin. If one has...
77
by: Hans Schneider | last post by:
1. in the prg bellow what vars are stored on stack, heap, data segment? int i; void main() { int j; int *k = (void *)malloc(1); }
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.