BC31103: 'Get' accessor of property '<propertyname>' is not accessible
A statement attempts to retrieve the value of a property when it does not have access to the property's Get
procedure.
If the Get Statement is marked with a more restrictive access level than its Property Statement, an attempt to read the property value could fail in the following cases:
The
Get
statement is marked Private and the calling code is outside the class or structure in which the property is defined.The
Get
statement is marked Protected and the calling code is not in the class or structure in which the property is defined, nor in a derived class.The
Get
statement is marked Friend and the calling code is not in the same assembly in which the property is defined.
Error ID: BC31103
To correct this error
If you have control of the source code defining the property, consider declaring the
Get
procedure with the same access level as the property itself.If you do not have control of the source code defining the property, or you must restrict the
Get
procedure access level more than the property itself, try to move the statement that reads the property value to a region of code that has better access to the property.
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for