The comment should disclose things that can not be immediately learned from the code.
3. Use Descriptive Names
What does a variable named dxy actually mean? Who knows. You’d probably have to read the entire chunk of code to reverse engineer its meaning. On the other hand, the meaning of a variable like distanceBetweenXY is instantly recognizable.
But, this doesn't necessarily apply to temporary variables. They can be as short as a single character.
Consistent Naming Scheme
mysql_real_escape_string()
MysqlRealEscapeString()
In C #, these methods are of two kinds: procedures and functions.
The syntax for declaring a method allows you to uniquely determine what the method is, a procedure or a function.
Example
What is the class name?
How many methods does the class include?
What are the names of these methods?
What access modifier?
What kind of methods, procedures or functions?
What events correspond to the methods?
What actions are performed when these methods are called?
What parameters?
Local variable declared within subroutines or programming blocks, their local scope means they can only be used within the subroutine or program block they were declared in
What are the differences?
Если не удалось найти и скачать презентацию, Вы можете заказать его на нашем сайте. Мы постараемся найти нужный Вам материал и отправим по электронной почте. Не стесняйтесь обращаться к нам, если у вас возникли вопросы или пожелания:
Email: Нажмите что бы посмотреть