I just tried to create this simple implementation:
class Test
{
private int abc = 0;
public class TestClass
{
private void changeABC()
{
abc = 123;
}
}
}
If I compile it, it will complain:
Cannot access a non-static member of outer type 'A.Test' via nested type 'B.Test.TestClass'
I dont like the solution of setting: static int abc = 0;
Is there any other solution for this?