Correct usage of generics in event declaration
问题 I have a data object which I pass around : public class TimedResult<T> { public ResultRequest Request { get; set; } public T Data { get; set; } public TimeSpan TimeTaken { get; set; } } In my Manager class I have some work done which raises an event : public void Execute(ResultRequest request) { var result = new TimedResult<DataTable>(); // fill data object here OnResult(result); } I have made the OnResult method generic : protected virtual void OnResult<T>(TimedResult<T> result) { if (Result