What is the difference betweenpublic delegate void SecondChangedHandler(Object clock, TimeInfoEventArgs ti);public event SecondChangedHandler OnSecondChanged;andpublic event EventHandler<TimeInfoEventArgs> OnSecondChanged;When should you use which and is there any best practice?
Delegates and events
c#;.net;delegates
Before generics the first approach was the only option to declare an event handler delegate. Since generics were introduced in .NET 2.0, EventHandler<T:EventArgs> is the preferred way. Semantically there is no difference between them.