namespace LedgerCommander.A
{
class B
{
static public int a = 7;
}
}
namespace LedgerCommander
{
using LedgerCommander.A;
public class MyClass
{
private int myProperty;
public int MyProperty { get { return LedgerCommander.A.B.a; } }
}
}
- this works fine, VS studio recognizes that return
LedgerCommander.A.B.a
can be simplified toB.a
- if class B is renamed to class A then VS thinks
LedgerCommander.A.A.a
can be simplified toA.A.a
- if I try to use
A.a
then there is an error message- 'The type or namespacename 'a' does not exist in the namespace LedgerCommander.A
- it seems that the
using
is ignored
- if I try to use
Is it a feature or a bug in c#?