摘要: 转自:http://www.cnblogs.com/JustRun1983/archive/2012/06/30/2571450.html接口的隐式实现,也是我们常用的方法。1 public interface IReview2 {3 void GetReviews();4 }5 public class ShopReview :IReview6 {7 //隐式实现8 public void GetReviews(){}9 } 接口的显式实现。1 public interface IReview2 {3 void GetReviews();4 }5 public... 阅读全文
posted @ 2014-04-09 23:30 nyth 阅读(363) 评论(0) 推荐(0) 编辑
摘要: 值类型与引用类型的简单测试。 1 [TestClass] 2 public class HomeControllerTest 3 { 4 [TestMethod] 5 public void ZhiTest() 6 { 7 int a = 10; 8 Zhi(a); 9 Assert.AreEqual(11, a);10 }11 public void Zhi(int a)12 {13 ... 阅读全文
posted @ 2014-04-09 23:17 nyth 阅读(481) 评论(0) 推荐(0) 编辑
摘要: 了解了这些也就明白了遍历的原理,晚安。 1 using System; 2 using System.Collections; 3 4 public class Person 5 { 6 public Person(string fName, string lName) 7 { 8 this.firstName = fName; 9 this.lastName = lName; 10 } 11 12 public string firstName; 13 public string lastName;... 阅读全文
posted @ 2014-04-09 23:11 nyth 阅读(1628) 评论(2) 推荐(0) 编辑