Is there something like this already available in the .NET framework?
public class EventArgs<T> : EventArgs {
private readonly T data;
public EventArgs(T data) {
this.data = data;
}
}
I know there is a generic event handler, I’m kinda surprised I can’t find a generic EventArgs class.
Thanks
No. Mainly because it fails the tests posed before something it added to the framework
EventHandler<>which is good for event handler regardless of the number of parameters used.)Func<>&Action<>which are used by the framework.)(UPDATED based on comments)