this 关键字
1)代表当前类的对象;
2)在类当中现实的调用本类的构造函数(语法为:this())
public Student(string name,int age,char gender,int chinese)//第一个构造函数
{
this.Name=name;
this.Age=age;
this.Gender=gender;
this.Chinese=chinese;
}
public Student(string name,int age,char gender):this(name,age,gender,0)//调用上一个构造函数,其中对于上面一个全参的构造函数来说,最后一个参数没有,就赋值为0
{
//调用上面的构造函数,巧用“this”不用写冗余代码
}