📄 class1.cs
字号:
using System;
namespace UnaryOps
{
class UnaryOpsApp
{
[STAThread]
static void Main(string[] args)
{
int a;
a = -42;
Console.WriteLine("{0}", a);
int b = 2;
int c = 42;
// a = b * -c;
// With parentheses, it's obvious that you're
// multiplying b by the negative of c.
a = b * (-c);
Console.WriteLine("{0}", a);
c = -42;
a = b * (+c);
Console.WriteLine("{0}", a);
a = b * (+-42);
Console.WriteLine("{0}", a);
a = b * (0+-42);
Console.WriteLine("{0}", a);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -