A
Alberto
I have a class A who send an event when an instance is modified.
So, I declared the event in this way:
public delegate void Evento(object sender);
public event Evento Modified;
To throw the event I wrote this sentence:
Modified(this);
I have a form who works with instances of the class A so I stored them in a
arrayList. Every time I create an instance, I say it witch is the handler of
the
event in this way:
((A)arrayA).Modified +=
new A.Evento(frmA_Modified);
The problem is when the event is raised from the class A. The error says
that
there is a reference to an object not established as an object instance.
I don't understand what's happening. Could anyone help me?
Thank you very much in advance.
So, I declared the event in this way:
public delegate void Evento(object sender);
public event Evento Modified;
To throw the event I wrote this sentence:
Modified(this);
I have a form who works with instances of the class A so I stored them in a
arrayList. Every time I create an instance, I say it witch is the handler of
the
event in this way:
((A)arrayA).Modified +=
new A.Evento(frmA_Modified);
The problem is when the event is raised from the class A. The error says
that
there is a reference to an object not established as an object instance.
I don't understand what's happening. Could anyone help me?
Thank you very much in advance.