List or BusinessObjectCollection?

后端 未结 18 1197
庸人自扰
庸人自扰 2020-12-23 11:11

Prior to C# generics, everyone would code collections for their business objects by creating a collection base that implemented IEnumerable

IE:

publi         


        
18条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-23 11:32

    I do the exact same thing as you Jonathan... just inherit from List. You get the best of both worlds. But I generally only do it when there is some value to add, like adding a LoadAll() method or whatever.

提交回复
热议问题