Naming: price list and price list

Which is more true, "Price List" or "Price List"?

FxCop says: CA1702: Microsoft.Naming: the compound word "PriceList" in the name of the type "PriceList" exists as a discrete term. If you use one word, use it as a "Price List".

Edit: this is an object with a name, start / end date, etc.

+3
source share
4 answers

Like FxCop, it depends on your intention. If you have an object that represents a price list, which possibly has a name and a release date, and then contains a list of items that bear a name and price, then the price list seems right.

OTH, if you have an object of type List<Price>, then a PriceList (or Price) would be better.

It is important not to hang too much on obedience to the rules and skip this principle. In this case, this is a completely human problem (as far as the compiler is concerned, it can be called Pinkelephants, pinkElephants or PinkElephants, it doesn’t matter). In this case, you should choose everything that seems most natural or normal.

+4
source

PriceList. . price list , Pascal.

+8

Merriam Webster Oxford. FxCop .

+3

"" "" .

, , "PriceList" ( ) , , , . "" (, ) / - , , ""

, , , , , , .

FxCop , . , FxCop "-" "-", .

+3

Source: https://habr.com/ru/post/1706394/


All Articles