Udostępnij za pośrednictwem


Property cannot be declared '<propertymodifier>' because it contains a 'Private' accessor

A property with a Private property procedure (Get or Set) is marked Overridable.

If a base class property or procedure is declared Private (Visual Basic), a derived class cannot override that property or procedure because it cannot access it. Because of this, you cannot use Private in combination with Overridable. This applies not only to the property itself but to the individual property procedures as well.

Error ID: BC31108

To correct this error

See Also

Tasks

How to: Declare a Property with Mixed Access Levels

Concepts

Property Procedures