Ambiguous in the Namespace


E

Erik

Hello,

Hoping someone can help me so I can build my homework!

I have a public class called Employee.vb in a project called
Compensation Review. I have created HourlyEmployee that Inherits
Employee. When I try to build it, I get an error:

'Employee' is ambiguous in the namespace 'Compensation_Review'

Any advice? I created a reference to Compensation Review.dll in the
Compensation Review project.
 
Ad

Advertisements

C

Charlie Brown

use the full namespace path when you reference "Employee"

If your namespace in foo.dll is MyNameSpace.Foo.Employee, use

DIm obj as New MyNameSpace.Foo.Employee

The ambigous error message is often displayed when it doesnt know which
"Employee" you are referencing in your code.

Use the class browser in VS to help you find the full namespace.
 
Ad

Advertisements

E

Erik

Charlie said:
use the full namespace path when you reference "Employee"

If your namespace in foo.dll is MyNameSpace.Foo.Employee, use

DIm obj as New MyNameSpace.Foo.Employee

The ambigous error message is often displayed when it doesnt know which
"Employee" you are referencing in your code.

Use the class browser in VS to help you find the full namespace.

This helped, thanks! I have 2 projects in my solution. I had defined
references to Compensation Review in each project causing the
ambiguity. I deleted one of the references and the build succeeded.

Much appreciated.
 

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