Click here to Skip to main content
15,888,600 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have written functions under a naming space in a different directory(folder)
the directory is like this
C:\ C# Tutorials\ Functions

I am now writing the Test program in another directory, like
C:\ C# Tutorials\ Test Functions.

Now my question is:
How can I call the function that are in different directories and different namespaces.
Posted

This is gibberish. A function has nothing to do with directories. And "naming space" (correctly: "namespace") has nothing to do with directories. The functions cannot be in different or the same directories. Executable files can be, yes, so what? You are totally lost!

I have no idea how to help but: learn programming, very basics and from scratch. Trying to guess what did you possibly mean and explain the elementary things goes to much beyond the format of Quick Questions and Answers.

—SA
 
Share this answer
 
Comments
Khipasi 18-Jan-12 4:52am    
Yes, I am totally lost you are right. Thanks for correcting the "naming space " to namespace. The problem is solved now as Nazmi has understood what I meant.
I suppose, "C:\ C# Tutorials\ Functions" is one project and "C:\ C# Tutorials\ Test Functions" another project.
In that case, you need to add "C:\ C# Tutorials\ Functions" project in your "C:\ C# Tutorials\ Test Functions" solution as project or as reference.
 
Share this answer
 
Comments
Khipasi 18-Jan-12 2:41am    
Hi Nazmi,

Thanks. I just addede the Program.cs of the Functions and addede the name of the namespace at the top using the "using" keyword and it worked perfecly.

Thanks again....
Joezer BH 12-Dec-13 2:03am    
5ed!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900