Let's say, I can not modify class A.
I have this in class A<T>
:
There is a JumpNext() method:
public void JumpNext();
It fires an event in class A<T>
, called Next
And this in my class B:
public T Next()
{
instanceofA.JumpNext();
//instanceofA.Next += something;
// wait for event
// someting(object sender, AEventArgs e)
//return e.Entry
}
The problem is, that my Next method has to return the instance of T contained in the Entry filed of AEventArgs returned by the A.Next event.
So How can I do this inside one method in class B?
I'm using .net 2.0, but if it is indeed possible in any later version only, that might be fine also.
Thx