摘要: public class Test{ public Test(int age){ this.Age=age;//如果这里使用的是this.age=age;那么属性里的判断将不会执行} private int age;public int Age{ get{return age;}set{ if(value<=18){ age=19;}else{ age=value;}}} 阅读全文
posted @ 2011-07-07 20:47 solomon_Blog 阅读(3323) 评论(2) 推荐(2) 编辑