Whats wrong with the following c# code? Compiler reports this error:
Inconsistent accessibility: parameter type \'ClassLibrary1.Interface1\' is less accessible than
Mark your interface as public:
public interface Interface1<T>
If you leave out the accessibility label, it defaults to internal
, that is, only accessible to other classes within the assembly.
your "Interface1" isn't public..
public interface Interface1<T>
{
bool IsDataValid();
/* Other interfaces */
}
second solution is If your interface is not public then dont make your class public where you are making a handle of interface.