Hey there,
i bumped the other day into a little problem regarding C#'s properties.
Let's say i do have this setup:
public class Point
{
public float X;
public float Y;
}
public class Control
{
protected Point m_Position = new Point();
public Point Position
{
get { return m_Position; }
set
{
m_Position = value; }
// reorganize internal structure..
reorganize();
}
protected reorganize()
{
// do some stuff
}
}
This is all fine, but when it comes to usage, i could write something like:
Control myControl = new Control();
myControl.Position.X = 1.0f;
The thing is, my Control class wont recognize that the Position has been changed because set hasn't been called.
So i guess my question is, is there a way to make Control aware of any Position changes?
Thanks in advance!
Mfg Imp