Download

Delegate declarations in interface

There are various cases in which it would be very helpful to be able to declare delegates in interfaces. For instance, I have a Networkable interface, which, in my game, means that whoever implements it, must expose two delegates that are broadcasted when the implementation wants to request, or yield resources such as energy or minerals. Now, I must derive these from a common base class which is inappropriate at times. I basically would like the same functionality in a UINTERFACE that C# offers:



public interface IDrawingObject {
    event EventHandler ShapeChanged;
}