Friday, 23 August 2013

Public class is inaccessible due to its protection level

Public class is inaccessible due to its protection level

I have the following classes (pseudocode):
public abstract class ClassA {}
public class ClassB : ClassA {}
Now I try to do the following:
public class ClassC {
public void Main() {
var thing = new ClassB();
}
}
Which returns the following error: ClassB is inaccessible due to its
protection level.
But they are all public.

No comments:

Post a Comment