internal class MyClassA
{
[...properties...]
public List<string> DoSomething(){}
}
// Different project/assembly, same solution:
public class MyBase
{
protected MyClassA _myClassA = new MyClassA(); // Here is the problem
}
// What I want to do:
public class SomeOtherClass : MyBase
{
private static void Foo(){
var list = _myClassA.DoSomething();
}
}
SomeOtherClass inherits from MyBase.
MyBase shall make an instance of MyClassA to make it accessible by SomeOtherClass (protected).
But since MyClassA is internal, this is not possible.
How can I make it possible, that SomeOtherClass can use MyClassA.DoSomething() while using the instance from MyBase?
PS: I am perfectly aware of the possibility to "just change visibility from MyClassA to public", that is not an option though.