C#图解教程学习笔记

图解C#教程 《Illustrated C# 7.0 The C# Language Presented Clearly,Concisely, and Visually Fifth Edition》

Identifiers—标识符,理解为"变量名","类名"等名字。由于名字必须独一无二,所以用identifiers

(身份identity)

规则:

首字母:字母和下划线和@-----yes

首字母:数字------------no

后续字母:字母和下划线—yes

后续字母:数字-yes,@--no

Identifiers are case-sensitive(区分大小写的). For instance, the variable names myVar and MyVar are different identifiers.
As an example, in the following code snippet(代码片段), the variable declarations are all valid and declare different
integer variables. But using such similar names will make coding more error-prone and debugging more
difficult. Those debugging your code at some later time will not be pleased.
// Valid syntactically, but very confusing!
int totalCycleCount;
int TotalCycleCount;
int TotalcycleCount;

猜你喜欢

转载自www.cnblogs.com/ifconfig/p/13196277.html