79075136

Date: 2024-10-10 15:30:23
Score: 1.5
Natty:
Report link

Sender parameter is sent so that in some situations event handler can set value of some properties depending on the logic implemented in the event handler. Secondly, there are third party libraries built on top of C#.NET for those library both sender, args argument are required to write custom code as required. It is possible to create EventArgs class by inheriting from EventArgs. Extending sender for adding custom properties, methods will add overhead for the code. Adding the sender to EventArgs will add overhead. Passing sender helps to pass the object hierarchy to the eventhandler.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: mackdc