简体   繁体   English

是否有一个C#等价的java的AbstractList?

[英]Is there a C# equivalent of java's AbstractList?

Java AbstractList class is very convenient when you need to implement the List interface whithout having to code everything from scratch. 当您需要实现List接口而不必从头开始编写所有代码时,Java AbstractList类非常方便。

Now, in C#, I need to implement a view on a part of my datamodel that would implement IList . 现在,在C#中,我需要在我的数据模型的一部分上实现一个实现IList的视图。

Is there an abstract class in .Net that I could inherit, in the same way that I would extend AbstractList if it was in Java ? 在.Net中是否有一个我可以继承的抽象类,就像我在Java中扩展AbstractList

您正在寻找System.Collections.ObjectModel.Collection<T>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM