There is such a situation
struct Point { int x; int y; public void SetX(int a){ ... } public void SetY(int a){ ... } } class A { Point cord = new Point(); public Point Cord { get { return cord; } } public void MethodA(int a) { cord.SetX(a); //здесь все ок } } class B { A myObj = new A(); public Point Cord { get { return cord; } } public void MethodB(int a) { myObj.Cord.SetX(a); //а здесь не присваивает значение } } In class A, the method works correctly, but in class B it does not (comes in a method, assigns something to something, but in the myObj object and in its cord field of type Point is not) I wonder why this value is assigned and why it works with classes but there is no structure.
private. - Vadim OvchinnikovmyObj.Cord.SetX(a);- Grundy