Is there any difference in use
SomeEvent(arg);
and
SomeEvent.Invoke(arg);
If there is no significant difference, which one is better?
The first form is C # syntactic sugar for the second. I have not seen anyone use the second form, but I can imagine that some code generators could βprovide the futureβ with code.
No difference, they are equivalent. SomeEvent(arg);is just syntactic sugar for.Invoke
.Invoke
They are exactly the same. The agreement is to use the first form.
Source: https://habr.com/ru/post/1750685/More articles:What are the criteria for determining "required or not in a Postgresql query? - sqlGetting events when deleting and pasting into jquery text box - jqueryCharacter encoding - encodinghttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1750683/alternatives-to-propertyinfogetvalue-for-mono&usg=ALkJrhiW6ptCKGEy30RMbXwTl-Od6D5J5gPython parent class static class variable access - pythonCollapse taxonomy in default node field - viewsRails: loss of quotes in message parameters - ruby-on-railsSilverlight DataGridTemplateColumn vs DataGridTextColumn - silverlightIs there a set of open source Netflow Collector C ++ libraries? - c ++Ruby on Rails: rack fix and deployment - ruby ββ| fooobar.comAll Articles