Export (0) Print
Expand All
Expand Minimize

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()
© 2014 Microsoft