I was taught that private methods should start in lowercase, for example:
thisIsBestPractice
I have installed some code style checks, and they suggest that private methods start with uppercase.
What is the current preferred industry standard?
The current industry standard is to define the standard and stick to it! The fact that you decide what your standard should be is not so important, but it is important that you all agree with it and use it. Thus, everyone knows that the camelCased method is private, although a modifier privatewould be cheap :)
private
FxCop - FxCop ,
, . .
, , . , . , (: / ). , .
, \. , .
, .
. , Microsoft , .
, , (_privateMethod, privateMethod, PrivateMethod, Private_Method ..), , , , . Pascal , Visual Studio, , . - , - .
I always knew the names of the methods in upper case, regardless of whether they are public or private. I often use The Elements of C # style, they suggest using PASCAL naming conventions such as uppercase storage.
public void AnExample() { }
http://www.amazon.co.uk/Elements-C-Style-Kenneth-Baldwin/dp/0521671590
Good reading, you can definitely find it cheaper, though.
In the end, it comes down to coding standards, regardless of whether they are decided by yourself or by the organization in which you work.
Source: https://habr.com/ru/post/1726394/More articles:NServicebus / CQRS: how to handle things in the user interface? - user-interfaceconsume yahoo webservice from .net code - c #Does PayPal include payment integration options that do not require PayPal to be displayed to the user? - paypalHow to enable multiple jars in classpath using ant? - javaЛучший способ выбрать из списка - не два списка, которые немного стареют? - css-selectorsCakePHP: disable GET form fields in url - phpHow can I use wildcard search to get a list from the forest in CakePHP? - phpWhat is the most suitable type of cfsqltype Coldfusion to use in a field like a unique MS SQL identifier? - coldfusionHow can I programmatically get a loaded project in Visual Studio 2008? - c #What does "Django Application Migration" mean? - databaseAll Articles