Curious to know why a representative of the form
public representative Zero EventHandler & Lt; Tender, Trent Argues & gt; (T & E Sender, Tribute ARGS E) where Trivand ARG: EventAGRS; Is not present in the structure? Is there any reason that only the following has been provided?
Public Representative Zero Event Handler & lt; TEventArgs & gt; (Object Sender, TEventArgs E) where TEventArgs: EventArgs; Answering your "Why" question is not easy - except those who know why Microsoft does not have it
BCL engineers decided on this and there is no other way? - But I will make an educated guess:
public representative void EventHandler & lt; TEventArgs & gt; (Object sender, TEventArgs e) where TEventArgs: EventArgs I can imagine that this representative type was added in .NET BCL as a "later idea". I went. Remember that .NET 1.0 did not have generic.
Another argument is that an event handler only handles events for a sender, so within that handler you already know about the sender sender logic, So to make the representative more general than why it should be for the most practical purposes. You are usually more interested in the incident logic than comparing the e sender, so it is generally understood to avoid creating an unnecessary type by making it normally.
Comments
Post a Comment