4 ms·
Prefixing "this.field" is nicer looking than "_field" for signifying a field rather than a local or parameter (These days most syntax highlightrs should be clev
by alkonaut 6y ago
Prefixing "this.field" is nicer looking than "_field" for signifying a field rather than a local or parameter (These days most syntax highlightrs should be clever enough to distinguish this by color, but in the past this was useful. As an added benefit autocomplete will be triggered after "this.".
> But even in this case, you should really be using Pascal casing as per Microsoft's Capitalization Conventions
Not sure what this is refering to. In assignmenmt this.foo = foo, both the field and the parameter should have the same casing, that's why "this.foo" is needed to distinguish the field from the parameter.
In the end, these are mostly cosmetic/style choices. Consistency matters more than whatever style is chosen, but I of course find it very important that we agree on my preference.