G
Guest
I have a delegate definition:
public delegate void SomeEventHandler(object obj);
To make an instance of it it’s easy:
public class myClass {
public event SomeEventHandler handler;
}
But, I need to instantiate an array of this delegate and this size will be
known only at the class construction.
I need:
(1) To declare on the delegates array.
(2) To populate this array during the construction with size depending on a
parameter passed as an argument to the constructor.
How to I do that?
I managed to it, but I could not mark the array delegates as events as I did
when I have a single delegate as shown above.
Any ideas?
public delegate void SomeEventHandler(object obj);
To make an instance of it it’s easy:
public class myClass {
public event SomeEventHandler handler;
}
But, I need to instantiate an array of this delegate and this size will be
known only at the class construction.
I need:
(1) To declare on the delegates array.
(2) To populate this array during the construction with size depending on a
parameter passed as an argument to the constructor.
How to I do that?
I managed to it, but I could not mark the array delegates as events as I did
when I have a single delegate as shown above.
Any ideas?