开发者

Do you see any way to shorten this class name?

I have a class called PriceStep. I keep a list of PriceStep objects in a class called PriceStepSearchSpace. Now I am required to have different PriceStepSearchSpace objects for different products and I need to keep them in some sort of a dictionary. I called this new class PriceStepSearchSpaceRepository.

Can you thi开发者_C百科nk of a simpler/shorter name?


You could call it Repository and put it in a namespace called PriceSteps.Searchspaces.


I might call it PriceStepSearchSpaces if it was unlikely that I would have any other type of collection of those objects. Otherwise, I like Timwi's idea of putting related classes into a namespace to prevent duplication of prefixes.


I would go with SearchSpace for your first and SearchSpaceDictionary for the second.

There's no need to preface a parent class with it's child class name!

However, you may want to re-think your object model, it's hard to give advice about that based on the info you provided.


PriceStep. PriceSteps. PriceStepsByProduct.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜