publicclass Student
{
privatestring name;
publicstring Name
{
get { return name; }
set { this.name = value; }
}
}
为什么会是value而不是其他什么,get的意思我懂
Student oneStudent = new Student();
oneStudent.Name = "Michael Jackson";
作为获取oneStudent.Name的值、
难道set就是为了给oneStudent.Name赋值吗?
回到最上面为什么回事this.name=value;为什么要用value这个词,求教