+ 3

Attach to a static event c#

I have a static class and event there declared as: public delegate void eEvent (); public static event eEvent onEvent; Now how I can bind to that event?

16th Sep 2019, 11:14 AM
Dejan Dozet
Dejan Dozet - avatar
2 Réponses
+ 1
1) you must call this event from your class 2) you must create in another class a method which will implement this event For example: https://code.sololearn.com/cgnuVcV61iwy/?ref=app
16th Sep 2019, 2:07 PM
id001x
id001x - avatar
+ 2
Great, tnx!
16th Sep 2019, 2:34 PM
Dejan Dozet
Dejan Dozet - avatar