Type.GetType(string)为空

时间:2023-01-18 18:41:23

Type type = Type.GetType(scheduleJob.JobType);

时type为空, 导致执行下一步时

MethodInfo method = type.GetMethod(scheduleJob.RunMethod);

报错,因为type 为空。最后找出原因是没有引用一个dll 导致为空

相关文章