Yang
Yang

Reputation: 172

CamelCase for internal capital word

Sorry this might be a very meta question, What should I name a variable with internal capitalized word? for example, get FX rate,

getFXrate?
getFxRate?
getFXRate?

Or is there some material I can read upon?

Best Regards

Upvotes: 1

Views: 25

Answers (1)

August Karlstrom
August Karlstrom

Reputation: 11377

One common approach is to use CamelCase only for abbreviations which are three characters ore more, for instance GetXmlSchema. In your example, however, where the abbreviation has only two characters, it would be the third alternative, GetFXRate.

Upvotes: 1

Related Questions