{
class clsA
{
private int _i;
public int I
{
set { _i = value; }
get { return _i; }
}
} struct strctB
{
private int _i;
public int I
{
set { _i = value; }
get { return _i; }
}
} class Program
{
static void Main1(string[] args)
{
clsA a1=new clsA();
a1.I=;
clsA a2=a1;
a2.I=;
Console.WriteLine("{0},{1}", a1.I, a2.I);//2,2
strctB b1=new strctB();
b1.I = ;
strctB b2=b1;
b2.I = ;
Console.WriteLine("{0},{1}", b1.I, b2.I);//1,2
}
static void Main(string[] args)
{
clsA a1 = new clsA();
a1.I = ;
clsA a2 = new clsA();
a2.I = ;
Console.WriteLine("{0}", a1.Equals(a2));//False
strctB b1 = new strctB();
b1.I = ;
strctB b2 = new strctB();
b2.I = ;
Console.WriteLine("{0}", b1.Equals(b2));//True
}
}
}

最新文章

  1. Netty系列之Netty百万级推送服务设计要点
  2. Android 多媒体播放API简介
  3. 解决pydev无法增加jython271 interpreter的问题
  4. 解决Only a type can be imported. com.mysql.jdbc.Connection resolves to a package的报错问题
  5. HTML解析类 ,让你不使用正则也能轻松获取HTML相关元素 -C# .NET
  6. Codeforces Round #149 (Div. 2)
  7. 7 天玩转 ASP.NET MVC — 第 5 天
  8. 把mvc4彻底搞定(一)
  9. 安装Visual Studio 2010时提示"The location specified for the help content store is invalid or you do not have access to it".
  10. hdu1285+hdu2467(拓扑排序)
  11. codeforces 6A. Triangle
  12. EF 关联数据查询
  13. java_反射
  14. 博客编辑器Open Live Writer的安装以及配置
  15. WPF中任务栏只显示主窗口
  16. .10-浅析webpack源码之graceful-fs模块
  17. Eclipse安装Markdown插件
  18. mysql 单表查询
  19. MQ5.3在redhat9上的安装
  20. PHP 杂项函数

热门文章

  1. Vue基础项目模板
  2. 左倾红黑树——左倾2-3树(不是jdk1.8的TreeMap的红黑树)
  3. mknod命令的使用
  4. 【译】RAID的概念和RAID对于SQL性能的影响
  5. 『Broken Robot 后效性dp 高斯消元』
  6. Direct Buffer介绍
  7. GoldenDict(for Linux)配置无道词典
  8. 史上最全HashMap红黑树解析
  9. Shadowmap简易实现
  10. [转]js获取iframe通过url传递的参数