Type tp = typeof(List<>).MakeGenericType(p.DataModel.GetType());

object tob= System.Activator.CreateInstance(tp);
object[] arg=new object[1];
arg[0] = p.DataModel;
tob.GetType().GetMethod("Add").Invoke(tob, arg);
typeof(SiteResume).GetField(p.TargetList).SetValue(sr, tob);

核心部分 哈哈

相关文章:

  • 2022-12-23
  • 2021-05-29
  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
  • 2022-12-23
  • 2021-12-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2021-11-24
  • 2022-03-05
  • 2021-09-07
  • 2022-12-23
相关资源
相似解决方案