简体   繁体   中英

Code analysis, Lost between CA1709 and CA1704

Because of these two KB articles, I am confused:

I have a property named ICD9 . My code analysis says that I have to change it to Icd 在此处输入图片说明

That sounds reasonable to me. I go and change it to Icd9 (I am not sure why it's suggesting Icd not Icd9 ) and I get a different warning 在此处输入图片说明

The KB says if my acronym is three-letter long I should use Pascal casing. Isn't Icd9 Pascal cased? I feel that 9 has causing the issue.

The first warning is because ICD is not the dictionary as an acronym, so it tells you not to use all caps.

The second warning is because ICD is not in the dictionary at all, so it thinks it is a misspelled word.

Either add ICD to the custom dictionary (as a normal word to get rid of the second warning or as a acronym and you can switch back to ICD9 and get rid of the first warning), or try to avoid short acronym names and use a longer more descriptive name for the property that uses words that are in the dictionary.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM