Ambiguous in the Namespace

  • Thread starter Thread starter Erik
  • Start date Start date
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.
 
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.
 
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.
 
Back
Top