举例说明:
public class Something
{
private static int number;
static Something()
{
int number = 10;
// Syntax to distingish between local variable and static variable ?
}
}
Run Code Online (Sandbox Code Playgroud)
在静态构造函数中,是否有一种语法可用于区分名为"number"的局部变量和同名的静态变量?
| 归档时间: |
|
| 查看次数: |
649 次 |
| 最近记录: |