C#構(gòu)造函數(shù)舉例
提問人:劉冬梅發(fā)布時間:2020-10-13
class Student
{
long id;
char gender;
int classID;
public Student() : this(0, 'F', 0)
{ }
public Student(long aID, char aGender, int aClassID)
{
id = aID;
gender = aGender;
classID = aClassID;
}
}
繼續(xù)查找其他問題的答案?
相關(guān)視頻回答
點擊加載更多評論>>