tag:blogger.com,1999:blog-5210693437012093137.post7173708002293073828..comments2023-10-23T22:06:14.743+01:00Comments on MrB's Blog: Delegates 101 - Part IV: Event HandlingMrBigglesworthhttp://www.blogger.com/profile/10403500373615286085noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5210693437012093137.post-60439342958858306672011-06-28T11:33:16.417+01:002011-06-28T11:33:16.417+01:00Yes, I agree the C# syntax is somewhat confusing. ...Yes, I agree the C# syntax is somewhat confusing. I guess the += operator was chosen to try and emphasise the fact that you are <em>adding</em> a handler to an event (which may already have other handlers wired up to it), rather than (re)assigning the handler.<br /><br />In that respect the VB.NET syntax is much more intuitive in my opinion.MrBigglesworthhttps://www.blogger.com/profile/10403500373615286085noreply@blogger.comtag:blogger.com,1999:blog-5210693437012093137.post-87430707735555929232011-06-24T21:06:43.260+01:002011-06-24T21:06:43.260+01:00Would you please explain lines 5-6 in the last lis...Would you please explain lines 5-6 in the last listing?<br /><br /> timer.Started += timer_Started;<br /> timer.Elapsed += timer_Elapsed;<br /><br />I don't know C# well enough to understand this. It looks like events are being updated with the return values from functions which return void. Huh?Anonymousnoreply@blogger.com