private string sortName = "PatientName";
string source = x.GetType().GetProperty(sortName).GetValue(x, null) as string;
反射一则 以字符串获得属性
本文转载:CSDN博客
private string sortName = "PatientName";
string source = x.GetType().GetProperty(sortName).GetValue(x, null) as string;