Delegates and events in the frontend?
1 answer
You can specify an event in an interface, but you cannot declare a delegate (or any other type) - at least not in C #. For instance:
// Valid
public delegate void BarHandler(object sender, EventArgs e);
public interface IFoo
{
event BarHandler Bar;
}
// Invalid
public interface IFoo
{
delegate void BarHandler(object sender, EventArgs e);
event BarHandler Bar;
}
+6
a source to share