Hi, I was wondering why I couldn't assign values to a rectangles member when
the rectangle is a property of a class ie.
// This works ok as expected.
Rectangle r = new Rectangle(10, 10, 10, 10);
r.Y = 20;
// when a rectangle is a property of my own class, I can't assign directly
to the Y value.
MyClass c = new MyClass();
c.MyRectangle = new Rectangle(10, 10, 10, 10);
c.MyRectangle.Y = 20; // Error: Cannot modify the return value because it is
not a variable!!!!!!!!!
c.MyRectangle = new Rectangle(10, 20, 10, 10); // ok
Thanks in advance.
Steve.