저는 C# 프로그래밍을 처음 접했고 아마추어 문제라는 것을 알고 있으므로 제발 웃지 마세요.인터페이스 구현 오류
난 내가 파생 된 클래스는 IInterface의 모든 멤버를 구현하지만 여전히 나는이 오류를 받아 봐 이러한 인터페이스
class derived : iInterface3
{
double[] d = new double[5];
public override int MyProperty
{
get
{
return 5;
}
set
{
throw new Exception();
}
}
int iProperty
{
get
{
return 5;
}
}
double this[int x]
{
set
{
d[x] = value;
}
}
}
class derived2 : derived
{
}
interface iInterface
{
int iProperty
{
get;
}
double this[int x]
{
set;
}
}
interface iInterface2 : iInterface
{ }
interface iInterface3 : iInterface2
{ }
선언했다.
는 인터페이스 부재 'final_exam_1.iInterface.this [지능] 구현하지 않는'final_exam_1.derived '. 'final_exam_1.derived.this [int]' 은 public이 아니기 때문에 인터페이스 멤버를 구현할 수 없습니다.
이
인터페이스 멤버 'final_exam_1.iInterface.iProperty'를 구현하지 않습니다 'final_exam_1.derived'. 'final_exam_1.derived.iProperty' public이 아니기 때문에 인터페이스 멤버를 구현할 수 없습니다.
이유는 무엇입니까?
미리 도움을 주셔서 감사합니다.