Ron,
All events are delegate chains. If the instance of the delegate is not
null, you can call the GetInvocationChain method on the delegate to get the
invocation chain for it. It returns an array of delegates that constitute
the chain.
Then, you can just return the length of the array.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Ron M. Newman" <co**********@confideltial.com> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Hi,
My class has an event to which other classes subscribe (e.g. myevent+=
foreignDelagate). I'd like to find out how many subscribers "myEvent" has.
Up till now I tested it for "null" or '!null" to find out if it has
anything there, but I need an exact number of subscribers. Is there any
way to query it?
Thanks!
-Ron