This is not a delegate question, but a coding practice.
In your code, you call both delegates, but only one displays the text in the console.
In the proposed code, only one delegate is called.
The second implementation is more efficient and the one you should use. From a programming point of view, the purpose of the code is also clear.
Whenever you are about to perform an action, you better decide which action you want to perform first, and then do it, rather than placing checks in each action.
If you like beans for dinner, you cannot pull each one out of the cupboard and then decide if you want beans and whether it can have beans in it or not. You check each one of them to see if it has beans and only get it.
source share