M
Matias Woloski
I'm kind of newbies on Delegates... this works on .Net Fx but not on the
..Net CF
How can I make this work... I just want to invoke the delegate.
Just a regular event being raised and I want to broadcast the notification
to the subscribers. This is what I have.
public static void BroadcastEvent(Delegate eventToBroadcast, object
eventSender, EventArgs eventData) {
if(eventToBroadcast != null) {
object [] args = new object[] { eventSender, eventData };
foreach(Delegate callbackDelegate in
eventToBroadcast.GetInvocationList()) {
callbackDelegate.DynamicInvoke(args); <-- This line make it
crash on .net cf
}
}
}
thanks,
Matias
..Net CF
How can I make this work... I just want to invoke the delegate.
Just a regular event being raised and I want to broadcast the notification
to the subscribers. This is what I have.
public static void BroadcastEvent(Delegate eventToBroadcast, object
eventSender, EventArgs eventData) {
if(eventToBroadcast != null) {
object [] args = new object[] { eventSender, eventData };
foreach(Delegate callbackDelegate in
eventToBroadcast.GetInvocationList()) {
callbackDelegate.DynamicInvoke(args); <-- This line make it
crash on .net cf
}
}
}
thanks,
Matias