Just a quick one: what are peoples thoughts on using Action delegates for public class events vs defining ones own event delegate types? I know many use Actions for "minor" delegates such as in lamdas and .ForEach() extension methods, etc, but for actual class event members, is using Actions a good idea? What is "best practice" in this area.
Thanks
Instead of Action, I use EventHandler<TEventArgs>
for any event declarations. It removes the need for me to define my own delegate type. It also has the additional benefit of forcing the data type to be derived from System.EventArgs and hence plays nicely with .Net event patterns.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With