Reputation: 141
I have been developing VB.Net winform apps using Visual Studio for several years and I am now just trying to get my head around C#. When I am using Visual Studio (currently VS 2017) to develop VB.Net winform apps I have three dropdowns at the top of the IDE that allows me to select the project, control and then events for the selected control. So if I want to handle, for example, the MouseDown event of a TextBox I simply select the MouseDown event in the dropdown and Visual Studio creates the event handler for me.
In C#, if I double click the control in the Design view it will automatically create the event handler for the default event, but what about all of the other events? Is there a C# equivalent way to VB.Net to generate the handler automatically or do I always have to create the event handlers manually?
Thanks
Upvotes: 1
Views: 184
Reputation: 570
Just switch to the event tab on your control property page and double-click your event and VS creates exact THIS handler for you.
Upvotes: 2