'ReadOnly' properties cannot have an access modifier on 'Get'

A ReadOnly property declaration specifies access levels in both the Property Statement and the Get Statement.

You can always specify an access level for the property. In addition, you can specify a different access level for at most one of its property procedures (Get or Set), provided it is more restrictive than the property's access level. You cannot specify access levels for both of the property procedures.

Error ID: BC31105

To correct this error

  • Remove the access modifier from the Get statement. It represents the entire ReadOnly property, and you cannot have two access levels for the property.

See Also

Tasks

How to: Declare a Property with Mixed Access Levels

Concepts

Property Procedures