以下c#代码有什么问题?编译器报告此错误:
可访问性不一致:参数类型"ClassLibrary1.Interface1"比方法"ClassLibrary1.Class1.Class1(ClassLibrary1.Interface1)"更难访问
使用以下代码:
interface Interface1<T>
{
bool IsDataValid();
/* Other interfaces */
}
public class Class1<T>
{
public Interface1<T> interface1;
public Class1(Interface1<T> interface1)
{
this.interface1 = interface1;
}
}
Run Code Online (Sandbox Code Playgroud)
我已经使用继承来设计我的代码,但如果有人能告诉我上面的错误,我会非常感激.
Sci*_*ist 56
你的"Interface1"不公开..
public interface Interface1<T>
{
bool IsDataValid();
/* Other interfaces */
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
60829 次 |
最近记录: |