用c#写一段程序
来源:百度知道 编辑:UC知道 时间:2024/06/29 22:41:13
public class Student
{
private string _Name;
private int _Age;
private string _StudentID;
public Student()
{
this._Name = "";
this._Age = "";
this._StudentID = "";
}
public string Name
{
get { return this._Name; }
set { this._Name = value;
}
public int Age
{
get { return this._Age; }
set { this._Age= value;
}
public string StudentID
{
get { return this._StudentID; }
set { this._Age= StudentID;
}
public void ShowStudent()
{
Console.WriteLine("Name:{0}, Age:{1}, StudentID:{3}", this._Name, this._Age, this._StudentID);
}
}
public class Student
{
public Student(string name,int age,int id)