零碎问题汇总

1、C# int 是对象吗?
答:汇总完的结果是这样子 
int是结构(struct),是值类型,也是对象,也是基本数据类型。
c#所有都继承自object
object有3个虚方法Equals,GetHashCode,ToString。1个方法GetType。2个静态方法Equals,ReferenceEquals


这些是所有数据类型都有的。也就是说任何数据类型都有ToString()。


CLI解释的话是这样子:
在未装箱的情况下,值类型不继承任何类型,装箱的情况下值类型才会继承ValueType或者Enum,并实现其它接口
[原文:In their unboxed form value types do not inherit from any type. Boxed value types shall inherit directly from System.ValueType unless they are enumerations, in which case, they shall inherit from System.Enum. Boxed value types shall be sealed.
  摘自:Common Language Infrastructure(CLI) Partition I: Concepts and Architecture Final Draft, Apr 2005 第42页]




摘自一个帖子:http://bbs.csdn.net/topics/190076602

2、 线程Thread 和协程 的区别

3、 C#垃圾回收机制和Java垃圾回收机制 的区别

喜欢unity 和酷炫的效果。欢迎留言交流。
原文地址:https://www.cnblogs.com/smilejoi/p/6667831.html