C# LinQ 通过字段名对应的字符串取得和设置字段值!

typ.GetType().GetProperty("BPlate").GetValue(typ, null).ToString();

spa1.GetType().GetProperty(KeyString).SetValue(spa1, val, null);

返回结果是:SA-240 304
原文地址:https://www.cnblogs.com/swtool/p/3833243.html