1.3 Variables and parameters

Variables represent storage locations.

Every variable has a type that determines what values can be stored in the variable.

Local variables are variables that are declared in methods,properties,or indexers.

A local variables is defined by specifying a type name and a declarator that specifies the variable name and an optional initial value,as in

View Code
1 int a;
2 int b=1;

but it is possible for a local variable declaration to include multiple declarators.The declarations of a and b can be rewritten as:

View Code
1 int a,b=1;
原文地址:https://www.cnblogs.com/daishuguang/p/3026222.html