C
C#2y ago
Pacrombie

❔ Empty event computational power

If I invoke an Action<SomeClass> as such: someAction?.Invoke(this) how much efficiency am I losing by invoking the event when it has no subscribers? Is this something I should worry about?
3 Replies
basically, i am little cat
probably you losing no efficiency, since that's equivamelentlmt to:
if (someAction != null)
someAction.Invoke(this);
if (someAction != null)
someAction.Invoke(this);
Pacrombie
PacrombieOP2y ago
awesome, thank you
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server