Compiler Error CS0060
Inconsistent accessibility: base class 'class1' is less accessible than class 'class2'
Class accessibility should be consistent between the base class and inherited class.
The following sample generates CS0060:
// CS0060.cs
class MyClass
// try the following line instead
// public class MyClass
{
}
public class MyClass2 : MyClass // CS0060
{
public static void Main()
{
}
}
See also
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.