Event '<eventname>' event specified by the 'DefaultEvent' attribute is not a publicly accessible event for this class

The DefaultEventAttribute attribute must specify the name of publicly accessible event in the class to which the attribute is applied.

Error ID: BC30770

To correct this error

  1. Make sure the class defines a publicly accessible event.

  2. Make sure that the name of the event in the class matches the name specified by the DefaultEventAttribute attribute.

See Also

Reference

DefaultEventAttribute

Event Statement

Class Statement (Visual Basic)

Public (Visual Basic)