Property without an 'As' clause; type of Object assumed

A property declaration does not specify an As clause.

An As clause identifies a data type to be associated with a programming element. In a Property Statement, it specifies the data type of the value that the property's Get procedure returns to the calling code. If you do not include an As clause in the Property statement, the property's data type defaults to Object.

By default, this message is a warning. For more information about hiding warnings or treating warnings as errors, see Configuring Warnings in Visual Basic.

Error ID: BC42022

To correct this error

  • Include an As clause in the Property statement to specify the property's data type.

See Also

Concepts

Property Procedures

Reference

Property Statement

Get Statement