codeformatter icon indicating copy to clipboard operation
codeformatter copied to clipboard

Language keywords instead of BCL types

Open bbowyersmyth opened this issue 10 years ago • 3 comments

11.We use language keywords instead of BCL types (i.e. int, string, float instead of Int32, String, Single , etc) for both type references as well as method calls (i.e. int.Parse instead of Int32.Parse ).

Don't know how difficult this is to change via Roslyn but when I see the following:

String[] result = new String[_capslist.Length];

my first thought is that this is old code. I personally don't mind either way for the method calls, it is mainly the declaration of string and object that give that impression.

This would likely give a large code churn but it also seems like the best time to do it.

bbowyersmyth avatar Feb 09 '15 21:02 bbowyersmyth

Agree. This is a gap between what the tool currently enforces and the guidelines. Will add.

jaredpar avatar Feb 09 '15 21:02 jaredpar

@jaredpar have you done anything with this yet? If not I might take a look at into it.

weshaggard avatar Dec 30 '15 01:12 weshaggard

@weshaggard go for it

jaredpar avatar Dec 30 '15 02:12 jaredpar