0
C#에서는 인터페이스를 구현할 때 필요한 값을 어떻게 작성합니까? 여기 인터페이스 NotImplementedExceptions
내 인터페이스 코드 :public interface IGridViewWithImageAndTextItem
{
string type { get; set;}
string thumbnailDisplayText { get; set; }
string thumbnailImageWebAddress { get; set; }
}
다음 코드가 추가 내 클래스에이 인터페이스 구현 : 무슨 값을 이제 인터페이스를 구현 한 것을
#region IGridViewWithImageAndTextItem implementation
public string type {
get {
throw new NotImplementedException();
}
set {
throw new NotImplementedException();
}
}
public string thumbnailDisplayText {
get {
throw new NotImplementedException();
}
set {
throw new NotImplementedException();
}
}
public string thumbnailImageWebAddress {
get {
throw new NotImplementedException();
}
set {
throw new NotImplementedException();
}
}
#endregion
을, 다음 코드를 대체합니다.
throw new NotImplementedException()
코드가 단순한 { get; set; }
값이 되나요? 아니면 다른 것이 필요합니까? 사전에
감사
만 자동 등록이 필요합니다. 따라서'{get; set;}'로 충분합니다. – Candide
* * 그렇게 보일 수도 있지만 프로그램이해야 할 일만 알면 질문에 답변 할 수 있습니다. –
그건 당신이하고 싶은 일에 전적으로 달려 있습니다. –