namespace A
{
class B
{
}
class A
{
public void f()
{
A.B var = new A.B();
}
}
}
Compiled with msvc 2019 and .net core 3.1, this code sample gives the following error:
Error CS0426 The type name 'B' does not exist in the type 'A'
I understand that it's better not to give the same names for classes and namespace. But is there any way to workaround such collision?