嘿,所以我目前正在为大学编写一个程序,在创建我的课程时,我正在使用 get set 我的问题是,有没有比下面显示的这种方法更简单的方法来设置东西。
显示我当前方式的代码片段
private string customer_first_name;
private string customer_surname;
private string customer_address;
public DateTime arrival_time;
//Using accessors to get the private variables
//Using accessors to set the private variables
public string Customer_First_Name
{
get { return customer_first_name; }
set { customer_first_name = value; }
}