//类
public class A
{
/// <summary>
/// 字段名称
/// </summary>
public string ZDMC
{
get;
set;
}
}
A t_BGSQ = new A(){ZDMC="ABC"};
string nameOfProperty = "ZDMC";
var propertyInfo = t_BGSQ.GetType().GetProperty(nameOfProperty);
var value = propertyInfo.GetValue(t_BGSQ, null).ToString();//值 "ABC"