file locations

I have a quick question on file locations in C# - ie the physical location where you store your sourcecode.  In java the location of your file was dictated by the namespace which contained them.  In C# though, the namespace has nothing to do with file location.  So, if I wanted to store some of my source files in a different directory, how would I go about doing that?  

Would I have to compile them to a dll?

Thanks much!!!
ARACK04Asked:
Who is Participating?
 
Bob LearnedCommented:
Yeah, C# natively doesn't like code in a single project to be distributed across multiple folders, unless they are sub-folders to the main project AFAIK.  Putting code into DLL's is certainly one way around that.

Bob
0
 
Carl TawnSystems and Integration DeveloperCommented:
By "different directory" do you mean a sub directory underneath the project, or a different location entirely ?

Storing the in subdirectories is straight forward. Just right-click on your Solution in the project browser and select "Add New Folder". This will create a new folder underneath your root project folder. Any files you put in here will be included in your compile.

I'm not sure if its possible to store files for your project in folders outside of the project folder.
0
 
ARACK04Author Commented:
What if I were programming on the command line (or writing a code generator)
0
 
ARACK04Author Commented:
points added
0
 
ARACK04Author Commented:
Thanks.  Nice user name :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.