我有一个类:ç性能#返回串联
public class LabOccurrenceForm
{
public DateTime Occurrence_Date { get; set; }
public string Cup_Type { get; set; }
public string Analytical_Testing_Phase { get; set; }
public string Area { get; set; }
public string Preanalytical_Before_Testing { get; set; }
public string Postanalytical_After_Testing { get; set; }
public string Other { get; set; }
public string Practice_Code { get; set; }
public string Comments { get; set; }
}
我想补充的类中的方法,将串联所有的变量是这样的:
public string AllData
{
return Occurrence_Date.ToString() + " " +
Cup_Type + " " +
Analytical_Testing_Phase + " " +
Area + " " +
Preanalytical_Before_Testing + " " +
Postanalytical_After_Testing + " " +
Other + " " +
Practice_Code + " " +
Comments;
}
这不起作用因为它想要获得或设置。我究竟做错了什么?我怎样才能解决这个问题?
错误 get或set访问预计\t它不会建立 –