Reputation: 4703
I was using Events in my class and added an event reference to the interface that my class was derived from. I have decided to use the Reactive framework and am now using the “Subject” type as shown below. I wanted to add this to the interface as all my functions pass around the interface but I get the error say I can’t add a field to an interface. Is there a way of exposing this new line of code in my interface or will I have to cast to the concrete type when subscribing ?
public Subject<PanelEventArguments> PanelEvt = new Subject<PanelEventArguments>();
Upvotes: 0
Views: 109
Reputation: 66531
Maybe I'm missing something, but couldn't you add it as a property?
Upvotes: 1