摘要:做了一个小测试,按照beautyispower原来的代码: using System;using System.Text;namespace Test{public class TestApp{ public static void Main( string[] args ) { int intTimeUsed=0; int intCount=0; int intMaxCount...
阅读全文
摘要:String s = “Hello”;Console.WriteLine(Object.ReferenceEquals(“Hello“,s));你猜显示是true还是false,很多人会猜false,你看,不是有两个“Hello”对象吗?可实际上应该是true,为什么呢?下面解释一下:其实CLR初始化时,他会创建一个内部散列表,键为字符串,值为指向托管堆中字符串对象的引用。刚开始这个表是空的。当J...
阅读全文