2012年1月9日
摘要: 阅读代码:View Code 1 class Program 2 { 3 static void Main() 4 { 5 Person p1 = new Person { Name = "Andy" }; 6 Person p2 = p1; 7 8 ModifyReferenceValue(p1); 9 ModifyReference(p1);10 p1 = new Person { Name = "David"};11 ... 阅读全文
posted @ 2012-01-09 15:30 Andy Niu 阅读(733) 评论(0) 推荐(0)
摘要: 阅读代码:View Code 1 class Program 2 { 3 static void Main() 4 { 5 Person p1 = new Person { Name = "Andy" }; 6 Person p2 = p1; 7 8 p1.Name = "Bill"; 9 p1 = new Person { Name = "Carol"};10 }11 }第5行:在栈上分配一个变量p1,p1的类型为Pers... 阅读全文
posted @ 2012-01-09 11:10 Andy Niu 阅读(323) 评论(0) 推荐(0)