N
Norbert Pürringer
Hello,
I've got a recursive data model, where the root object gets a certain
event handler:
DataObject root = new DataObject();
root.DataObjectCreated += new
DataObjectEventHandler(OnDataObjectCreated);
Now the DataObject has a collection of sub data objects with following
property:
public List<DataObject> DataObjects
{
get
{
if (_dataObjects == null)
{
_dataObjects = new List<DataObject>();
DataObject child = new DataObject();
_dataObjects.Add(child);
child.DataObjectCreated += DataObjectCreated /// ????
}
return _dataObjects;
}
}
How can I assign the event handler of the root to the event handler of
the child. My desire is, that a certain function is always called, if
a data object (never mind if root or child) is created.
How can I realize it?
Thank you,
Norbert
I've got a recursive data model, where the root object gets a certain
event handler:
DataObject root = new DataObject();
root.DataObjectCreated += new
DataObjectEventHandler(OnDataObjectCreated);
Now the DataObject has a collection of sub data objects with following
property:
public List<DataObject> DataObjects
{
get
{
if (_dataObjects == null)
{
_dataObjects = new List<DataObject>();
DataObject child = new DataObject();
_dataObjects.Add(child);
child.DataObjectCreated += DataObjectCreated /// ????
}
return _dataObjects;
}
}
How can I assign the event handler of the root to the event handler of
the child. My desire is, that a certain function is always called, if
a data object (never mind if root or child) is created.
How can I realize it?
Thank you,
Norbert