摘要: 在创建实例的时候通过构造函数调用构造函数里面的方法只是构造函数其中的一个作用.在我看来,构造函数的大部分作用是在做参数传递.下面的这个例子说明:class Vehicle { public Vehicle() { } public Vehicle(string model) { this.model = model; } public Vehicle(string wheel, string color, string model) :this(model) { this.wheel = wheel; this.color = color; } protected string wheel; 阅读全文
posted @ 2011-04-27 21:36 winchou 阅读(1794) 评论(0) 推荐(0) 编辑