class1.cs
来自「C#开发教程 由浅入深 配有实例 是初学者的好帮手」· CS 代码 · 共 28 行
CS
28 行
using System;
namespace RelOpRefs
{
class NumericTest
{
protected int i;
public NumericTest(int i)
{
this.i = i;
}
}
class RelOpRefsApp
{
[STAThread]
static void Main(string[] args)
{
NumericTest test1 = new NumericTest(42);
NumericTest test2 = new NumericTest(42);
Console.WriteLine("{0}", test1 == test2);
Decimal d1 = new Decimal(42);
Decimal d2 = new Decimal(42);
Console.WriteLine("{0}", d1.Equals(d2));
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?