Events when implementing Interfaces
Hi - Hobby coder here. Trying to expand my coding. My query is around using Events in Interfaces. Let's say I have an interface that includes:
When I do "Implement reminaing memebers explicity" (I often add to my inerface as I go) I get the following:
I can't figure out how to implent this in code. I am wanting to fire the event when a user clicks a button. The only way I can find to get it working is by changing the above to:
And then, on button click:
However, the problem with this approach is that I don't want GameClicked to be
I know I'm getting things mixed up in terms of the core ideas and have done lots of reading around Delegates etc, but just getting more confused. What's the simplest way to achieve the above without the event being public?
When I do "Implement reminaing memebers explicity" (I often add to my inerface as I go) I get the following:
I can't figure out how to implent this in code. I am wanting to fire the event when a user clicks a button. The only way I can find to get it working is by changing the above to:
And then, on button click:
However, the problem with this approach is that I don't want GameClicked to be
Public. However, if I change it to Internal it won't compile due to the INterface needing implementing again..I know I'm getting things mixed up in terms of the core ideas and have done lots of reading around Delegates etc, but just getting more confused. What's the simplest way to achieve the above without the event being public?