Code inspection: Cannot access symbol in text argument
Some frameworks use string literals to refer to code symbols. Even if the name is correct, the referenced member might still be inaccessible from the current context. This inspection reports a string-based symbol reference when the referenced symbol exists but cannot be accessed because of its visibility, for example because it is private or otherwise not available from the current location.
Example
class Person
{
private string FullName => "John Smith";
}
[SomeFrameworkAttribute("FullName")]
class Example
{
}
class Person
{
public string FullName => "John Smith";
}
[SomeFrameworkAttribute("FullName")]
class Example
{
}
01 April 2026