Whats wrong with the following c# code? Compiler reports this error:
Inconsistent accessibility: parameter type 'ClassLibrary1.Interface1' is less accessible than method 'ClassLibrary1.Class1.Class1(ClassLibrary1.Interface1)'
with the following code:
interface Interface1<T>
{
bool IsDataValid();
/* Other interfaces */
}
public class Class1<T>
{
public Interface1<T> interface1;
public Class1(Interface1<T> interface1)
{
this.interface1 = interface1;
}
}
I've since designed my code differently using inheritence to but if anyone could tell me what the above is wrong I'd greatly appreciate it.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…