Hello All,
In a c# project I'm managing a List of objects of a custom class.
private List<MeshXNA> _Meshes = new List<MeshXNA>();
I then have a couple of different custom controls that display
information about the objects in that list (not only 3d).
I would like to achieve that the different controls could save the
reference to the list in order to be aware (at given intervals) of
further instances added.
at the moment I'm passing the data to the controls in this way:
bControl.SetModelList(ref _Meshes);
and the function is as follows:
public void SetModelList(ref
List<WinFormsGraphicsDevice.Device3D.MeshXNA> Meshes)
{
_meshes = Meshes;
// some initialization code
}
This seems to work, but I'm wondering if there's a better way of
sharing information structures across controls and form. Any
suggestion is welcome.
Best,
Claudio