Hide all notifications when screen sharing
You didn't mention the OS you're using so for this answer I'm using 10.12.5.
Source.

You can option+click on the 3 lines for Notification Center in the menu bar:

This will silence any notifications that use the Apple system for notifications.  To put notifications back to normal, option+click again.

This doesn't silence any notifications that don't use Apple's system.  To silence those, you'll need to turn them off at the application-level.