在 C# 中,如何在实现接口时填写所需的值。
这是我的界面代码:
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; }
值,还是需要做其他事情?
提前致谢