R
rom15becs
Hi everyone,
I'm working on a project that uses 2 forms : one to select an object
and one other to display its attributes.
I mean that in the first one I select an object (from a ComboBox),
then I open a new form where I could see all the properties of that
object.
The problem is that I can't find a way to "transfer" my SelectedItem
from my selection Form to the other Form.
I tried to declare a private attribute with some accessors like that:
=====================================================
public partial class TheForm : Form
{
private MyObject _theObject;
public MyObject theObject
{
get
{
return this._theObject;
}
set
{
this._theObject = value;
}
}
private void TheForm_Load(object sender, EventArgs e)
{
============================================
But that generate accessibility errors on compilation.
Does anyone can help me Please ?
Regards
Romain KEIRSEBILCK
I'm working on a project that uses 2 forms : one to select an object
and one other to display its attributes.
I mean that in the first one I select an object (from a ComboBox),
then I open a new form where I could see all the properties of that
object.
The problem is that I can't find a way to "transfer" my SelectedItem
from my selection Form to the other Form.
I tried to declare a private attribute with some accessors like that:
=====================================================
public partial class TheForm : Form
{
private MyObject _theObject;
public MyObject theObject
{
get
{
return this._theObject;
}
set
{
this._theObject = value;
}
}
private void TheForm_Load(object sender, EventArgs e)
{
============================================
But that generate accessibility errors on compilation.
Does anyone can help me Please ?
Regards
Romain KEIRSEBILCK