#nullable enable
using System;
interface IMyInterface
{
internal event Action MyEvent;
}
class MyClass : IMyInterface
// IMyInterface impls
event Action? _myevent;
event Action? IMyInterface.MyEvent
add => _myevent += value;
remove => _myevent -= value;
// Public API
public void Fire()
_myevent?.Invoke();
public class Program
public static void Main()
var c = new MyClass();
(c as IMyInterface).MyEvent += () => { Console.WriteLine("Callback"); };
c.Fire();