Assume I want to have one subject delegate to inform observers about some event, but not every listeners needs to take a parameters. I tried doing overloads like in normal methods, but it gives me an error:
public delegate void LayerChange(Layer layer);
public delegate void LayerChange(); // Error 'Duplicate definition'
public event LayerChange OnLayerChange;
Do I need to declare another delegate and launch both events?
public delegate void LayerChange(Layer layer);
public event LayerChange OnLayerChange;
public delegate void LayerChange2();
public event LayerChange2 OnLayerChange2;
Or shouldn’t be worried about that, do one delegate and just ignore paramater in those observersI don’t need it?