According to this post the following code below should compile, while it does not.
class Base
protected m_x as integer
end class
class Derived1
inherits Base
public sub Foo(other as Base)
other.m_x = 2
end sub
end class
class Derived2
inherits Base
end class
What could be the problem with it? I just made a new VB.NET console project and copy-pasted the code.
The error message I get is: 'SampleProject.Base.m_x' is not accessible in this context because it is 'Protected', and I have checked on different .NET framework versions (2.0, 3.0 and 3.5).