After some fiddling around, I have figured out the required syntax for the event in the derived class. Is there anything else I need to add to the bug report that we need to watch for when doing this?
namespace Test
{
public delegate void TestEventHandler();
public interface ITestEvent
{
event TestEventHandler TestEvent;
}
public class testEventImplementation : ITestEvent
{
// C# 7 version - need to add "public" keyword to this event
// otherwise the code does not compile
public event TestEventHandler TestEvent;
}
}
and from a VS2019 C# .NET core solution:
public interface ITestEvent
{
public delegate void TestEventHandler();
public event TestEventHandler TestEvent;
}
class TestEventImplementation : ITestEvent
{
// C# 8 version - keeping public keyword from event in base class
// need to scope the return type, since the type is not being
// implemented here, instead used from the base class
public event ITestEvent.TestEventHandler TestEvent;
}