Expand Minimize
This topic has not yet been rated - Rate this topic

Access modifier '<accessmodifier>' is not valid

A Get Statement or Set Statement (Visual Basic) specifies an access level that is less restrictive than that specified for the containing property.

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. For example, if the property is Friend, you can specify Private for a property procedure, but not Public. You cannot specify access levels for both of the property procedures.

Error ID: BC31100

To correct this error

  • Make the access level for the property procedure more restrictive than for the property, or remove the access modifier entirely.

  • Declare the less restrictive access level in the Property Statement, and declare the more restrictive access level in one of the property procedures.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.