References

J

Jim Heavey

I am having difficulty figuring out to reference a class outside of a
project but still within the same solution. So here are my details...

My Solution is called "Fred" with a namespace called "Fred" and a Class
called frmFred.
The solution has Two Projects, one call "Fred" with a NameSpace called
"Fred" the other is called "Mary" with a namespace named "Mary" with a
class called "Mary".

I want Fred Project - Class frmFred to be able to access Project2 Namespace
called "Fred" and class called "Fred".

I went into the "Solution Explorer" and created a reference to "Fred.dll".
I went into namespace "Fred" with the class named "Fred" and added the
following using statement;

using Mary.Mary

This is where I am hitting a brick wall. It does not like "Mary.Mary". I
does not like "using Mary". It does not like using Fred.Mary.

So what am I missing?

Thanks in advance for your assistance....
 
J

Joe Mayo

Hi Jim,

The root of your problems is that you are using the same identifiers for
classes and namespaces. It would be better to make them different names.

Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top