예제 #1
0
        static void Main(string[] args)
        {
            classA ClassA = new classA();

            WriteLine($"ClassA.State = {ClassA.State}");
            classA.classB ClassB = new classA.classB();
            ClassB.setPrivateState(ClassA, 999);
            WriteLine($"ClassA.State = {ClassA.State}");
            ReadKey();
        }
예제 #2
0
 public void setPrivateState(classA target, int newState)
 {
     target.state = newState;
 }