I am having an interesting namespace conflict. When we use a third party
lib we create a company assembly for any descending classes to go in. I
have simplified the problem into the example below.
We are using the third party assembly Abc.Reports so we have an assembly
called ComanyName.Abc.
The problem is when I try to use the class Abc.Reports.Thing it tries to
find it in CompanyName.Abc.Reports.Thing.
It is assuming I have entered a partial namespace path when actually I have
entered a complete path.
What I really need is some way to tell it that it is the full path from the
root like: root.Abc.Reports.Thing.
Is there a way to specifiy that it is the full path?
This can normally be solved by having a "using Abc.Reports" at the top and
then just working with "Thing" but in this case I cannot because "Thing"
exists ambiguously in two places in the third party lib.
Of course I can fix this by just renaming our namespace but I thought it was
an interesting problem that you can't tell the compiler that you are
referring to the full path, or can you?
Example code:
namespace CompanyName.Abc
{
public class MyClass
{
// Get a compile error here:
// I have specified the full namespace path but
// it tries to look for CompanyName.Abc.Reports.Thing
private Abc.Reports.Thing Thing;
}
}
--
Andrew Cutforth - AJC Software - www.ajcsoft.com
The best folder synchronize and directory compare tool available.
AJC Active Backup instantly archives every file you edit giving you
unlimited undo and automatic revision control. Never lose your data again.