![](/img/trans.png)
[英]How to Display List of Classes and it properties in a propertygrid that implement an interface C#
[英]Implement Interface with List and get Value c#
我有一个名为IConnector的接口
具有以下属性:
[OperationContract]
List<Details> RequestDetailsSchedule();
[OperationContract]
bool SetDetailsSchedule(List<Details> lstDetails);
我尝试实施
public class Regulator: IConnector
public List<Details>RequestDetailsSchedule
{
throw new NotImplementedException();
}
我如何获得清单的内容?
这是实现接口的最基本方法。
public class Regulator: IConnector
{
public List<Details> RequestDetailsSchedule()
{
throw new NotImplementedException();
}
public bool SetDetailsSchedule(List<Details> lstDetails)
{
throw new NotImplementedException();
}
}
清单来自哪里? 数据库? 无论如何,只是因为您要提出一个抽象,所以我会一直这样做,就像这样:
public interface IConnector {
IEnumerable<Details> RequestDetailsSchedule();
bool SetDetailsSchedule(IEnumerable<Details> details);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.