更新时间:2021-11-04 22:52:50
在我看来,只有一个主要区别:
From my point of view, there is only one major difference:
这可能看起来没有什么大的区别,但如果你仔细想想,在某些情况下,你会想要使用一种而不是另一种:
This might not seem like a big difference, but if you think about it, there are some cases when you want to use one over the other:
getSubscribedEvents
的返回值来更改订阅者在运行时注册的事件,甚至在注册订阅者之后(想想有一次,您听到一个非常嘈杂的事件,只想执行一次)getSubscribedEvents
(Think about a time where you listen to a very noisy event and you only want to execute something one time)可能还有其他我不知道的差异!
There might be other differences I'm not aware of though!