using name space 
Author Message
 using name space

I made a lot of CSharp classes in a lot of name spaces.

However, I was not able to use those name spaces in other projects.

Can I only use those name spaces in only that project? ( i don't think so )

Do I need to compile in some way?

Can anyone let me know how to use those name spaces?

Thanx in advance



Sun, 04 Jul 2004 09:10:04 GMT  
 using name space
In your classes where you're calling the namespaced classes, how have you
structured your "using" statements?  Also, have you set a reference to the
DLLs that house them?

Another thing to consider, when debugging, is trying to use the desired
class's fully qualified namespace, ie:

TopName.SubName.SubSubName.TheObjectOfMyDesire.PullMyStrings();

Chris.


Quote:
> I made a lot of csharp classes in a lot of name spaces.

> However, I was not able to use those name spaces in other projects.

> Can I only use those name spaces in only that project? ( i don't think
so )

> Do I need to compile in some way?

> Can anyone let me know how to use those name spaces?

> Thanx in advance



Sun, 04 Jul 2004 15:13:43 GMT  
 using name space
I am not quit sure what you are asking but I think I am using all the
namespaces and using statements right since I am using those in different
files in same project.

Only problem is that I cannot use that namespaces in other project.

So do i have to make the DLLs and add them to the reference?

If that's the problem, how can I make the DLLs?

Thanx


Quote:
> In your classes where you're calling the namespaced classes, how have you
> structured your "using" statements?  Also, have you set a reference to the
> DLLs that house them?

> Another thing to consider, when debugging, is trying to use the desired
> class's fully qualified namespace, ie:

> TopName.SubName.SubSubName.TheObjectOfMyDesire.PullMyStrings();

> Chris.



> > I made a lot of csharp classes in a lot of name spaces.

> > However, I was not able to use those name spaces in other projects.

> > Can I only use those name spaces in only that project? ( i don't think
> so )

> > Do I need to compile in some way?

> > Can anyone let me know how to use those name spaces?

> > Thanx in advance



Mon, 05 Jul 2004 02:41:31 GMT  
 using name space
Ok-- are you using VisualStudio.Net or just the SDK?

I'll assume the former, in which case all you need to do is set a reference
to the assemblies (read: DLLs) that you want to use in your current project.
This is the equivalent of using the "/r" switch from the command line.

Building a DLL or assembly is easy;  it's essentially the same process as
coding up classes, except instead of compiling your code into an .exe
application, you're compiling it into a library.  Using VS.Net, you'd want
to create a Class Library.

From the command line, the difference is the "/t" switch, which tells the
compiler not to look for a "static void Main()" method, and hence make a
.dll instead of a .exe.

To use your DLL, all you need to do is set the reference, and implement the
correct "using" statements.  Another thing to watch out for is spelling and
capitalization-- sounds silly, but it's tripped me up more than once.

Chris.


Quote:
> I am not quit sure what you are asking but I think I am using all the
> namespaces and using statements right since I am using those in different
> files in same project.

> Only problem is that I cannot use that namespaces in other project.

> So do i have to make the DLLs and add them to the reference?

> If that's the problem, how can I make the DLLs?

> Thanx


> > In your classes where you're calling the namespaced classes, how have
you
> > structured your "using" statements?  Also, have you set a reference to
the
> > DLLs that house them?

> > Another thing to consider, when debugging, is trying to use the desired
> > class's fully qualified namespace, ie:

> > TopName.SubName.SubSubName.TheObjectOfMyDesire.PullMyStrings();

> > Chris.



> > > I made a lot of csharp classes in a lot of name spaces.

> > > However, I was not able to use those name spaces in other projects.

> > > Can I only use those name spaces in only that project? ( i don't think
> > so )

> > > Do I need to compile in some way?

> > > Can anyone let me know how to use those name spaces?

> > > Thanx in advance



Mon, 05 Jul 2004 14:26:48 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. classes using each other's name space

2. name space

3. System.Web.Mail name space

4. Q: Name Space Clashes in Libraries ??

5. name-space conflicts

6. in what name space is class DataAdapterDesigner?

7. name space

8. P2P Name-Space Project Need Comments

9. ANSI name space on Power Macintosh?

10. ANSI name space on Power Macintosh?

11. Help wanted on avoiding name space pollution

12. ANSI name space requirements/limitations

 

 
Powered by phpBB® Forum Software