标签:col set new 获取值 相同 bsp sum name 属性
类
public class A { /// <summary> /// 字段名称 /// </summary> public string Name { 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"
标签:col set new 获取值 相同 bsp sum name 属性
原文地址:https://www.cnblogs.com/daimaxuejia/p/11763847.html