Example provided is for a different Delegate (the EventHandler<TEventArgs> Delegate)
Type of issue
Other (describe below)
Description
It is a confusing example.
This page is about the "EventHandler Delegate", but the example provided is for the "EventHandler<TEventArgs> Delegate".
I tried to get the "EventHandler Delegate" to work in my code, but it didn't work. I did eventually discover my mistake, but having an appropriate example would have made it much quicker. I have no issue if you adjust the example to provide a sample for both Delegates.
Page URL
https://learn.microsoft.com/en-us/dotnet/api/system.eventhandler?view=net-8.0
Content source URL
https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System/EventHandler.xml
Document Version Independent Id
45d1db6b-180e-bc7c-7cd5-2ca83367b161
Article author
@dotnet-bot
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
The sample for EventHandler should not use EventHandler<TEventArgs>.
@steveharter @mdell-seradex there are no samples on the page. Or do you mean a Remark section as an example?
@steveharter @mdell-seradex there are no samples on the page. Or do you mean a Remark section as an example?
@kanilsz, that would be due to this: https://github.com/dotnet/dotnet-api-docs/pull/10741/files
@mdell-seradex probably this could be closed then
@kanilsz, I'd prefer the example to be "restored" and corrected.