.NET Name Standard for Roman Numeric Class Names

I am working on a new project that involves government funding. Thus, we will have objects (classes, properties, methods) that refer to government legislation, which has names like Title II, Title IV-A, Title IX, Title XVI, etc.

We follow Microsoft's recommendations for names, but the Pascal / camel body is for those who don't read my eyes well at this point. With the Pascal case, I get classes called TitleIi, TitleIva, TitleIx TitleXvi. Camel body gives me variables with titleIi, titleIva, titleIx, titleXvi.

Another option is to use Arabic numerals instead of Roman numerals. This gives me Title2, Title4, which reads better, but gives the impression that we have several instances of something (e.g. AddressLine1 and AddressLine2).

I am looking for suggestions on this.

+4
source share
3 answers

I suggest you do what is most readable in your code base. If the camel body causes legibility problems, then do not follow this guide in this case.

These are only recommendations, not rules.

+2
source

After all, naming conventions are just "conventions."

In your example, I would use title_IV_A or title_IV_A - you will get rid of a headache and make your life easier.

+2
source

I would simply ignore the recommendations and name the classes TitleII , TitleIV_A , etc. (note that you may need to replace "-" with "_").

0
source

All Articles