在我的应用程序中,以下是 getter/setter:
private string client { get { return ClientText.Text; } set { ClientText.Text=value;} }
private string application { get { return ApplicationText.Text; } set { ApplicationText.Text = value; } }
private string starttime { get { return StartTimeText.Text; } set { StartTimeText.Text = value; } }
private string stoptime { get { return StopTimeText.Text; } set { StopTimeText.Text = value; } }
private string task { get { return TaskText.Text; } set { TaskText.Text = value; } }
private string project { get { return ProjectText.Text; } set { ProjectText.Text = value; } }
我想将这 6 个值传递给以下人员,
Harvest_TimeSheetEntry entry=new Harvest_TimeSheetEntry(string,string,DateTime,DateTime,int,int);
我应该如何转换这 6 个属性并传递给该函数/构造函数?