Can events have access modifiers

Q

Can events have access modifiers ?

✍: Guest

A

Events are always public as they are meant to serve every one register ing to it. But you can access modifiers in events.You can have events with protected keyword which will be accessible only to inherited classes.You can have private events only for object in that class.

2007-10-23, 7707👍, 0💬