📄 variabledeclaration.cs
字号:
using System;
class VariableDeclaration
{
public static void Main()
{
// declaring variables of type bool, string, integer, short and float
bool test = true;
short num1 = 19;
int num2 = 14000;
string val = "Jamie";
float num3 = 14.5f;
// displaying variable values
Console.WriteLine("Boolean value = " + test);
Console.WriteLine("Short value = " + num1);
Console.WriteLine("Integer value = " + num2);
Console.WriteLine("String value = " + val);
Console.WriteLine("Float value = " + num3);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -