E
_eddie
Easier to show than to explain:
file 1:
---------------------------------------------------
namespace Somename {
public class Somename {
....
}
}
file 2:
--------------------------------------------------
using Somename;
......
Somename s1 = new Somename; // Error!
Somename s2 = new Somename.Somename; // OK
--------------------------------------------------
This generates an error because the compiler thinks it is ambiguous.
It relates to the fact that the namespace and class in file 1 have the
same name. Changing either name fixes it.
Not sure why. You'd think it would be qualified by the 'using'
statement. Is this according to spec? I thought I had seen this done
without the error message.
file 1:
---------------------------------------------------
namespace Somename {
public class Somename {
....
}
}
file 2:
--------------------------------------------------
using Somename;
......
Somename s1 = new Somename; // Error!
Somename s2 = new Somename.Somename; // OK
--------------------------------------------------
This generates an error because the compiler thinks it is ambiguous.
It relates to the fact that the namespace and class in file 1 have the
same name. Changing either name fixes it.
Not sure why. You'd think it would be qualified by the 'using'
statement. Is this according to spec? I thought I had seen this done
without the error message.