📄 ch1_04.cs
字号:
using System;
class CH1_4 {
// Class level x variable
static int x = 10;
public static void Main()
{
// Locally defined copy of x
int x = 5;
int y = x;
double z = y + 10.25;
int a = (int)z;
// Output X. Which one gets written?
Console.WriteLine("X = {0} Y = {1} Z = {2}", x, y, z);
Console.WriteLine("A = {0}", a);
// Force the output of the class level x variable
Console.WriteLine("Class Level X = {0}", CH1_4.x);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -