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

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

返回结果是:SA-240 304
C# LinQ 通过字段名对应的字符串取得和设置字段值!

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-03
  • 2022-12-23
  • 2021-10-22
  • 2021-10-08
  • 2021-09-05
猜你喜欢
  • 2022-12-23
  • 2021-08-25
  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
  • 2022-12-23
相关资源
相似解决方案