0
Answer

C# - events and object creating

Magic

Magic

18y
1.7k
1
Hi! I got a little problem, perhaps it's easy to work out, but I cant handle it. I got a class, MyClass, with events and delegates inside. I also got a class called MyObserver that has on object of MyClass as a field. I want to detect creation of that object with an event but I cant find a way to fire it. I mean, it's not possible in the constructor, cause delegates are not subscribed and I can not suscribe them earlier, cause object is null. I appreciate any help.