0 out of 2 rated this helpful - Rate this topic

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()
   {
   }
}
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ